HackBrowserData/internal/item/item.go

159 lines
3.1 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:
return UnknownItem
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:
return UnsupportedItem
case FirefoxCreditCard:
return UnsupportedItem
case FirefoxHistory:
return fileFirefoxData
case FirefoxExtension:
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:
return UnsupportedItem
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 07:53:19 +00:00
return TempFirefoxPassword
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:
return UnsupportedItem
case FirefoxCreditCard:
return UnsupportedItem
case FirefoxExtension:
return UnsupportedItem
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,
ChromiumLocalStorage,
ChromiumExtension,
YandexPassword,
YandexCreditCard,
}
var DefaultChromium = []Item{
ChromiumKey,
ChromiumPassword,
ChromiumCookie,
ChromiumBookmark,
ChromiumHistory,
ChromiumDownload,
ChromiumCreditCard,
ChromiumLocalStorage,
ChromiumExtension,
2022-04-02 06:47:12 +00:00
}