HackBrowserData/item/item.go

159 lines
3.2 KiB
Go
Raw Normal View History

2022-04-02 06:47:12 +00:00
package item
2022-04-02 08:59:34 +00:00
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
)
2022-04-02 06:47:12 +00:00
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:
2022-04-29 15:59:37 +00:00
return fileChromiumExtension
2022-04-02 06:47:12 +00:00
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:
2022-04-19 13:28:43 +00:00
return fileFirefoxLocalStorage
2022-04-02 06:47:12 +00:00
case FirefoxHistory:
return fileFirefoxData
case FirefoxExtension:
2022-04-29 16:37:23 +00:00
return fileFirefoxExtension
case FirefoxCreditCard:
2022-04-02 06:47:12 +00:00
return UnsupportedItem
default:
return UnknownItem
}
}
func (i Item) String() string {
switch i {
case ChromiumKey:
2022-04-11 07:53:19 +00:00
return TempChromiumKey
2022-04-02 06:47:12 +00:00
case ChromiumPassword:
2022-04-11 07:53:19 +00:00
return TempChromiumPassword
2022-04-02 06:47:12 +00:00
case ChromiumCookie:
2022-04-11 07:53:19 +00:00
return TempChromiumCookie
2022-04-02 06:47:12 +00:00
case ChromiumBookmark:
2022-04-11 07:53:19 +00:00
return TempChromiumBookmark
2022-04-02 06:47:12 +00:00
case ChromiumDownload:
2022-04-11 07:53:19 +00:00
return TempChromiumDownload
2022-04-02 06:47:12 +00:00
case ChromiumLocalStorage:
2022-04-11 07:53:19 +00:00
return TempChromiumLocalStorage
2022-04-02 06:47:12 +00:00
case ChromiumCreditCard:
2022-04-11 07:53:19 +00:00
return TempChromiumCreditCard
2022-04-02 06:47:12 +00:00
case ChromiumExtension:
2022-04-29 15:59:37 +00:00
return TempChromiumExtension
2022-04-02 06:47:12 +00:00
case ChromiumHistory:
2022-04-11 11:57:40 +00:00
return TempChromiumHistory
2022-04-02 06:47:12 +00:00
case YandexPassword:
2022-04-11 07:53:19 +00:00
return TempYandexPassword
2022-04-02 06:47:12 +00:00
case YandexCreditCard:
2022-04-11 07:53:19 +00:00
return TempYandexCreditCard
2022-04-02 06:47:12 +00:00
case FirefoxKey4:
2022-04-11 07:53:19 +00:00
return TempFirefoxKey4
2022-04-02 06:47:12 +00:00
case FirefoxPassword:
2022-04-11 07:53:19 +00:00
return TempFirefoxPassword
2022-04-02 06:47:12 +00:00
case FirefoxCookie:
2022-04-11 12:53:50 +00:00
return TempFirefoxCookie
2022-04-02 06:47:12 +00:00
case FirefoxBookmark:
2022-04-11 07:53:19 +00:00
return TempFirefoxBookmark
2022-04-02 06:47:12 +00:00
case FirefoxDownload:
2022-04-11 07:53:19 +00:00
return TempFirefoxDownload
2022-04-02 06:47:12 +00:00
case FirefoxHistory:
2022-04-11 07:53:19 +00:00
return TempFirefoxHistory
2022-04-02 06:47:12 +00:00
case FirefoxLocalStorage:
2022-04-19 13:28:43 +00:00
return TempFirefoxLocalStorage
2022-04-02 06:47:12 +00:00
case FirefoxCreditCard:
return UnsupportedItem
case FirefoxExtension:
2022-04-29 16:37:23 +00:00
return TempFirefoxExtension
2022-04-02 06:47:12 +00:00
default:
return UnknownItem
}
}
2022-04-11 07:53:19 +00:00
var DefaultFirefox = []Item{
FirefoxKey4,
FirefoxPassword,
FirefoxCookie,
FirefoxBookmark,
FirefoxHistory,
FirefoxDownload,
FirefoxCreditCard,
FirefoxLocalStorage,
FirefoxExtension,
}
var DefaultYandex = []Item{
ChromiumKey,
ChromiumCookie,
ChromiumBookmark,
ChromiumHistory,
ChromiumDownload,
ChromiumExtension,
YandexPassword,
2022-04-19 13:28:43 +00:00
ChromiumLocalStorage,
2022-04-11 07:53:19 +00:00
YandexCreditCard,
}
var DefaultChromium = []Item{
ChromiumKey,
ChromiumPassword,
ChromiumCookie,
ChromiumBookmark,
ChromiumHistory,
ChromiumDownload,
ChromiumCreditCard,
ChromiumLocalStorage,
ChromiumExtension,
2022-04-02 06:47:12 +00:00
}