You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
159 lines
3.2 KiB
159 lines
3.2 KiB
3 years ago
|
package item
|
||
|
|
||
3 years ago
|
type Item int
|
||
|
|
||
|
const (
|
||
|
ChromiumKey Item = iota
|
||
|
ChromiumPassword
|
||
|
ChromiumCookie
|
||
|
ChromiumBookmark
|
||
|
ChromiumHistory
|
||
|
ChromiumDownload
|
||
|
ChromiumCreditCard
|
||
|
ChromiumLocalStorage
|
||
|
ChromiumExtension
|
||
|
|
||
|
YandexPassword
|
||
|
YandexCreditCard
|
||
|
|
||
|
FirefoxKey4
|
||
|
FirefoxPassword
|
||
|
FirefoxCookie
|
||
|
FirefoxBookmark
|
||
|
FirefoxHistory
|
||
|
FirefoxDownload
|
||
|
FirefoxCreditCard
|
||
|
FirefoxLocalStorage
|
||
|
FirefoxExtension
|
||
|
)
|
||
|
|
||
3 years ago
|
func (i Item) FileName() string {
|
||
|
switch i {
|
||
|
case ChromiumKey:
|
||
|
return fileChromiumKey
|
||
|
case ChromiumPassword:
|
||
|
return fileChromiumPassword
|
||
|
case ChromiumCookie:
|
||
|
return fileChromiumCookie
|
||
|
case ChromiumBookmark:
|
||
|
return fileChromiumBookmark
|
||
|
case ChromiumDownload:
|
||
|
return fileChromiumDownload
|
||
|
case ChromiumLocalStorage:
|
||
|
return fileChromiumLocalStorage
|
||
|
case ChromiumCreditCard:
|
||
|
return fileChromiumCredit
|
||
|
case ChromiumExtension:
|
||
3 years ago
|
return fileChromiumExtension
|
||
3 years ago
|
case ChromiumHistory:
|
||
|
return fileChromiumHistory
|
||
|
case YandexPassword:
|
||
|
return fileYandexPassword
|
||
|
case YandexCreditCard:
|
||
|
return fileYandexCredit
|
||
|
case FirefoxKey4:
|
||
|
return fileFirefoxKey4
|
||
|
case FirefoxPassword:
|
||
|
return fileFirefoxPassword
|
||
|
case FirefoxCookie:
|
||
|
return fileFirefoxCookie
|
||
|
case FirefoxBookmark:
|
||
|
return fileFirefoxData
|
||
|
case FirefoxDownload:
|
||
|
return fileFirefoxData
|
||
|
case FirefoxLocalStorage:
|
||
3 years ago
|
return fileFirefoxLocalStorage
|
||
3 years ago
|
case FirefoxHistory:
|
||
|
return fileFirefoxData
|
||
|
case FirefoxExtension:
|
||
3 years ago
|
return fileFirefoxExtension
|
||
|
case FirefoxCreditCard:
|
||
3 years ago
|
return UnsupportedItem
|
||
|
default:
|
||
|
return UnknownItem
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (i Item) String() string {
|
||
|
switch i {
|
||
|
case ChromiumKey:
|
||
3 years ago
|
return TempChromiumKey
|
||
3 years ago
|
case ChromiumPassword:
|
||
3 years ago
|
return TempChromiumPassword
|
||
3 years ago
|
case ChromiumCookie:
|
||
3 years ago
|
return TempChromiumCookie
|
||
3 years ago
|
case ChromiumBookmark:
|
||
3 years ago
|
return TempChromiumBookmark
|
||
3 years ago
|
case ChromiumDownload:
|
||
3 years ago
|
return TempChromiumDownload
|
||
3 years ago
|
case ChromiumLocalStorage:
|
||
3 years ago
|
return TempChromiumLocalStorage
|
||
3 years ago
|
case ChromiumCreditCard:
|
||
3 years ago
|
return TempChromiumCreditCard
|
||
3 years ago
|
case ChromiumExtension:
|
||
3 years ago
|
return TempChromiumExtension
|
||
3 years ago
|
case ChromiumHistory:
|
||
3 years ago
|
return TempChromiumHistory
|
||
3 years ago
|
case YandexPassword:
|
||
3 years ago
|
return TempYandexPassword
|
||
3 years ago
|
case YandexCreditCard:
|
||
3 years ago
|
return TempYandexCreditCard
|
||
3 years ago
|
case FirefoxKey4:
|
||
3 years ago
|
return TempFirefoxKey4
|
||
3 years ago
|
case FirefoxPassword:
|
||
3 years ago
|
return TempFirefoxPassword
|
||
3 years ago
|
case FirefoxCookie:
|
||
3 years ago
|
return TempFirefoxCookie
|
||
3 years ago
|
case FirefoxBookmark:
|
||
3 years ago
|
return TempFirefoxBookmark
|
||
3 years ago
|
case FirefoxDownload:
|
||
3 years ago
|
return TempFirefoxDownload
|
||
3 years ago
|
case FirefoxHistory:
|
||
3 years ago
|
return TempFirefoxHistory
|
||
3 years ago
|
case FirefoxLocalStorage:
|
||
3 years ago
|
return TempFirefoxLocalStorage
|
||
3 years ago
|
case FirefoxCreditCard:
|
||
|
return UnsupportedItem
|
||
|
case FirefoxExtension:
|
||
3 years ago
|
return TempFirefoxExtension
|
||
3 years ago
|
default:
|
||
|
return UnknownItem
|
||
|
}
|
||
|
}
|
||
|
|
||
3 years ago
|
var DefaultFirefox = []Item{
|
||
|
FirefoxKey4,
|
||
|
FirefoxPassword,
|
||
|
FirefoxCookie,
|
||
|
FirefoxBookmark,
|
||
|
FirefoxHistory,
|
||
|
FirefoxDownload,
|
||
|
FirefoxCreditCard,
|
||
|
FirefoxLocalStorage,
|
||
|
FirefoxExtension,
|
||
|
}
|
||
|
|
||
|
var DefaultYandex = []Item{
|
||
|
ChromiumKey,
|
||
|
ChromiumCookie,
|
||
|
ChromiumBookmark,
|
||
|
ChromiumHistory,
|
||
|
ChromiumDownload,
|
||
|
ChromiumExtension,
|
||
|
YandexPassword,
|
||
3 years ago
|
ChromiumLocalStorage,
|
||
3 years ago
|
YandexCreditCard,
|
||
|
}
|
||
|
|
||
|
var DefaultChromium = []Item{
|
||
|
ChromiumKey,
|
||
|
ChromiumPassword,
|
||
|
ChromiumCookie,
|
||
|
ChromiumBookmark,
|
||
|
ChromiumHistory,
|
||
|
ChromiumDownload,
|
||
|
ChromiumCreditCard,
|
||
|
ChromiumLocalStorage,
|
||
|
ChromiumExtension,
|
||
3 years ago
|
}
|