feat: support export session storage for chromium
This commit is contained in:
parent
01bf9806e0
commit
115e1d29c6
|
@ -11,6 +11,7 @@ import (
|
|||
"github.com/moond4rk/HackBrowserData/browingdata/history"
|
||||
"github.com/moond4rk/HackBrowserData/browingdata/localstorage"
|
||||
"github.com/moond4rk/HackBrowserData/browingdata/password"
|
||||
"github.com/moond4rk/HackBrowserData/browingdata/sessionstorage"
|
||||
"github.com/moond4rk/HackBrowserData/item"
|
||||
"github.com/moond4rk/HackBrowserData/log"
|
||||
"github.com/moond4rk/HackBrowserData/utils/fileutil"
|
||||
|
@ -89,6 +90,8 @@ func (d *Data) addSources(items []item.Item) {
|
|||
d.sources[source] = &creditcard.ChromiumCreditCard{}
|
||||
case item.ChromiumLocalStorage:
|
||||
d.sources[source] = &localstorage.ChromiumLocalStorage{}
|
||||
case item.ChromiumSessionStorage:
|
||||
d.sources[source] = &sessionstorage.ChromiumSessionStorage{}
|
||||
case item.ChromiumExtension:
|
||||
d.sources[source] = &extension.ChromiumExtension{}
|
||||
case item.YandexPassword:
|
||||
|
|
|
@ -69,6 +69,7 @@ func (c *Chromium) BrowsingData(isFullExport bool) (*browingdata.Data, error) {
|
|||
if err := data.Recovery(c.masterKey); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return data, nil
|
||||
}
|
||||
|
||||
|
@ -81,6 +82,9 @@ func (c *Chromium) copyItemToLocal() error {
|
|||
if i == item.ChromiumLocalStorage {
|
||||
err = fileutil.CopyDir(path, filename, "lock")
|
||||
}
|
||||
if i == item.ChromiumSessionStorage {
|
||||
err = fileutil.CopyDir(path, filename, "lock")
|
||||
}
|
||||
if i == item.ChromiumExtension {
|
||||
err = fileutil.CopyDirHasSuffix(path, filename, "manifest.json")
|
||||
}
|
||||
|
|
|
@ -2,15 +2,16 @@ package item
|
|||
|
||||
// item's default filename
|
||||
const (
|
||||
fileChromiumKey = "Local State"
|
||||
fileChromiumCredit = "Web Data"
|
||||
fileChromiumPassword = "Login Data"
|
||||
fileChromiumHistory = "History"
|
||||
fileChromiumDownload = "History"
|
||||
fileChromiumCookie = "Cookies"
|
||||
fileChromiumBookmark = "Bookmarks"
|
||||
fileChromiumLocalStorage = "Local Storage/leveldb"
|
||||
fileChromiumExtension = "Extensions"
|
||||
fileChromiumKey = "Local State"
|
||||
fileChromiumCredit = "Web Data"
|
||||
fileChromiumPassword = "Login Data"
|
||||
fileChromiumHistory = "History"
|
||||
fileChromiumDownload = "History"
|
||||
fileChromiumCookie = "Cookies"
|
||||
fileChromiumBookmark = "Bookmarks"
|
||||
fileChromiumLocalStorage = "Local Storage/leveldb"
|
||||
fileChromiumSessionStorage = "Session Storage"
|
||||
fileChromiumExtension = "Extensions"
|
||||
|
||||
fileYandexPassword = "Ya Passman Data"
|
||||
fileYandexCredit = "Ya Credit Cards"
|
||||
|
@ -29,26 +30,28 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
TempChromiumKey = "chromiumKey"
|
||||
TempChromiumPassword = "password"
|
||||
TempChromiumCookie = "cookie"
|
||||
TempChromiumBookmark = "bookmark"
|
||||
TempChromiumHistory = "history"
|
||||
TempChromiumDownload = "download"
|
||||
TempChromiumCreditCard = "creditCard"
|
||||
TempChromiumLocalStorage = "localStorage"
|
||||
TempChromiumExtension = "extension"
|
||||
TempChromiumKey = "chromiumKey"
|
||||
TempChromiumPassword = "password"
|
||||
TempChromiumCookie = "cookie"
|
||||
TempChromiumBookmark = "bookmark"
|
||||
TempChromiumHistory = "history"
|
||||
TempChromiumDownload = "download"
|
||||
TempChromiumCreditCard = "creditCard"
|
||||
TempChromiumLocalStorage = "localStorage"
|
||||
TempChromiumSessionStorage = "sessionStorage"
|
||||
TempChromiumExtension = "extension"
|
||||
|
||||
TempYandexPassword = "yandexPassword"
|
||||
TempYandexCreditCard = "yandexCreditCard"
|
||||
|
||||
TempFirefoxKey4 = "firefoxKey4"
|
||||
TempFirefoxPassword = "firefoxPassword"
|
||||
TempFirefoxCookie = "firefoxCookie"
|
||||
TempFirefoxBookmark = "firefoxBookmark"
|
||||
TempFirefoxHistory = "firefoxHistory"
|
||||
TempFirefoxDownload = "firefoxDownload"
|
||||
TempFirefoxLocalStorage = "firefoxLocalStorage"
|
||||
TempFirefoxCreditCard = ""
|
||||
TempFirefoxExtension = "firefoxExtension"
|
||||
TempFirefoxKey4 = "firefoxKey4"
|
||||
TempFirefoxPassword = "firefoxPassword"
|
||||
TempFirefoxCookie = "firefoxCookie"
|
||||
TempFirefoxBookmark = "firefoxBookmark"
|
||||
TempFirefoxHistory = "firefoxHistory"
|
||||
TempFirefoxDownload = "firefoxDownload"
|
||||
TempFirefoxLocalStorage = "firefoxLocalStorage"
|
||||
TempFirefoxSessionStorage = "firefoxSessionStorage"
|
||||
TempFirefoxCreditCard = ""
|
||||
TempFirefoxExtension = "firefoxExtension"
|
||||
)
|
||||
|
|
11
item/item.go
11
item/item.go
|
@ -11,6 +11,7 @@ const (
|
|||
ChromiumDownload
|
||||
ChromiumCreditCard
|
||||
ChromiumLocalStorage
|
||||
ChromiumSessionStorage
|
||||
ChromiumExtension
|
||||
|
||||
YandexPassword
|
||||
|
@ -24,6 +25,7 @@ const (
|
|||
FirefoxDownload
|
||||
FirefoxCreditCard
|
||||
FirefoxLocalStorage
|
||||
FirefoxSessionStorage
|
||||
FirefoxExtension
|
||||
)
|
||||
|
||||
|
@ -41,6 +43,8 @@ func (i Item) FileName() string {
|
|||
return fileChromiumDownload
|
||||
case ChromiumLocalStorage:
|
||||
return fileChromiumLocalStorage
|
||||
case ChromiumSessionStorage:
|
||||
return fileChromiumSessionStorage
|
||||
case ChromiumCreditCard:
|
||||
return fileChromiumCredit
|
||||
case ChromiumExtension:
|
||||
|
@ -88,6 +92,8 @@ func (i Item) String() string {
|
|||
return TempChromiumDownload
|
||||
case ChromiumLocalStorage:
|
||||
return TempChromiumLocalStorage
|
||||
case ChromiumSessionStorage:
|
||||
return TempChromiumSessionStorage
|
||||
case ChromiumCreditCard:
|
||||
return TempChromiumCreditCard
|
||||
case ChromiumExtension:
|
||||
|
@ -112,6 +118,8 @@ func (i Item) String() string {
|
|||
return TempFirefoxHistory
|
||||
case FirefoxLocalStorage:
|
||||
return TempFirefoxLocalStorage
|
||||
case FirefoxSessionStorage:
|
||||
return TempFirefoxSessionStorage
|
||||
case FirefoxCreditCard:
|
||||
return UnsupportedItem
|
||||
case FirefoxExtension:
|
||||
|
@ -155,6 +163,7 @@ var DefaultFirefox = []Item{
|
|||
FirefoxDownload,
|
||||
FirefoxCreditCard,
|
||||
FirefoxLocalStorage,
|
||||
FirefoxSessionStorage,
|
||||
FirefoxExtension,
|
||||
}
|
||||
|
||||
|
@ -168,6 +177,7 @@ var DefaultYandex = []Item{
|
|||
ChromiumExtension,
|
||||
YandexPassword,
|
||||
ChromiumLocalStorage,
|
||||
ChromiumSessionStorage,
|
||||
YandexCreditCard,
|
||||
}
|
||||
|
||||
|
@ -181,5 +191,6 @@ var DefaultChromium = []Item{
|
|||
ChromiumDownload,
|
||||
ChromiumCreditCard,
|
||||
ChromiumLocalStorage,
|
||||
ChromiumSessionStorage,
|
||||
ChromiumExtension,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue