|
|
|
package hackbrowserdata
|
|
|
|
|
refactor: Refactor project as library layout
- Add new files `bookmark.go`, `chromium_darwin.go`, `browserdata/cookie.go`, `browser_windows.go`, `browser_linux.go`, `datatype.go`, `password.go`, `browserdata/browserdata.go`, `chromium_linux.go`, `chromium_windows.go`
- Refactor `NewChromium` function to accept an `Options` argument
- Refactor `options` code to use a struct instead of multiple arguments
- Modify `filterExistDataPaths` to return data paths instead of `BrowserData`
- Add `Passwords` and `Cookies` functions to `chromium`
- Delete unused files and functions ` errors.go`, `cookie.go`, `browsingdata.go`, `consts.go`, `firefox.go`, `password.go`, `chromium_test.go`, `firefox_test.go`
- Improve error messages for keychain related issues
- Change `BrowserData.Passwords()` to `Passwords()` for simplification
- Remove unused code for browsers `Yandex` and `Edge`, and unused map `browsers` and methods `BrowsingData()` and `AllBrowsingData()` from chromium and firefox structs
- Add `DefaultDBHandler` and `DefaultJSONHandler` functions for SQLite3 queries
1 year ago
|
|
|
import (
|
|
|
|
"github.com/moond4rk/hackbrowserdata/browserdata"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Browser interface {
|
refactor: Refactor project as library layout
- Add new files `bookmark.go`, `chromium_darwin.go`, `browserdata/cookie.go`, `browser_windows.go`, `browser_linux.go`, `datatype.go`, `password.go`, `browserdata/browserdata.go`, `chromium_linux.go`, `chromium_windows.go`
- Refactor `NewChromium` function to accept an `Options` argument
- Refactor `options` code to use a struct instead of multiple arguments
- Modify `filterExistDataPaths` to return data paths instead of `BrowserData`
- Add `Passwords` and `Cookies` functions to `chromium`
- Delete unused files and functions ` errors.go`, `cookie.go`, `browsingdata.go`, `consts.go`, `firefox.go`, `password.go`, `chromium_test.go`, `firefox_test.go`
- Improve error messages for keychain related issues
- Change `BrowserData.Passwords()` to `Passwords()` for simplification
- Remove unused code for browsers `Yandex` and `Edge`, and unused map `browsers` and methods `BrowsingData()` and `AllBrowsingData()` from chromium and firefox structs
- Add `DefaultDBHandler` and `DefaultJSONHandler` functions for SQLite3 queries
1 year ago
|
|
|
Passwords() ([]browserdata.Password, error)
|
|
|
|
|
|
|
|
Cookies() ([]browserdata.Cookie, error)
|
|
|
|
|
refactor: Refactor project as library layout
- Add new files `bookmark.go`, `chromium_darwin.go`, `browserdata/cookie.go`, `browser_windows.go`, `browser_linux.go`, `datatype.go`, `password.go`, `browserdata/browserdata.go`, `chromium_linux.go`, `chromium_windows.go`
- Refactor `NewChromium` function to accept an `Options` argument
- Refactor `options` code to use a struct instead of multiple arguments
- Modify `filterExistDataPaths` to return data paths instead of `BrowserData`
- Add `Passwords` and `Cookies` functions to `chromium`
- Delete unused files and functions ` errors.go`, `cookie.go`, `browsingdata.go`, `consts.go`, `firefox.go`, `password.go`, `chromium_test.go`, `firefox_test.go`
- Improve error messages for keychain related issues
- Change `BrowserData.Passwords()` to `Passwords()` for simplification
- Remove unused code for browsers `Yandex` and `Edge`, and unused map `browsers` and methods `BrowsingData()` and `AllBrowsingData()` from chromium and firefox structs
- Add `DefaultDBHandler` and `DefaultJSONHandler` functions for SQLite3 queries
1 year ago
|
|
|
ExtractBrowserData(dataTypes []DataType) (map[DataType]interface{}, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewBrowser(b browser, options ...BrowserOption) (Browser, error) {
|
refactor: Refactor project as library layout
- Add new files `bookmark.go`, `chromium_darwin.go`, `browserdata/cookie.go`, `browser_windows.go`, `browser_linux.go`, `datatype.go`, `password.go`, `browserdata/browserdata.go`, `chromium_linux.go`, `chromium_windows.go`
- Refactor `NewChromium` function to accept an `Options` argument
- Refactor `options` code to use a struct instead of multiple arguments
- Modify `filterExistDataPaths` to return data paths instead of `BrowserData`
- Add `Passwords` and `Cookies` functions to `chromium`
- Delete unused files and functions ` errors.go`, `cookie.go`, `browsingdata.go`, `consts.go`, `firefox.go`, `password.go`, `chromium_test.go`, `firefox_test.go`
- Improve error messages for keychain related issues
- Change `BrowserData.Passwords()` to `Passwords()` for simplification
- Remove unused code for browsers `Yandex` and `Edge`, and unused map `browsers` and methods `BrowsingData()` and `AllBrowsingData()` from chromium and firefox structs
- Add `DefaultDBHandler` and `DefaultJSONHandler` functions for SQLite3 queries
1 year ago
|
|
|
opt, ok := defaultBrowserOptions[b]
|
|
|
|
if !ok {
|
|
|
|
return nil, ErrBrowserNotSupport
|
|
|
|
}
|
|
|
|
|
refactor: Refactor project as library layout
- Add new files `bookmark.go`, `chromium_darwin.go`, `browserdata/cookie.go`, `browser_windows.go`, `browser_linux.go`, `datatype.go`, `password.go`, `browserdata/browserdata.go`, `chromium_linux.go`, `chromium_windows.go`
- Refactor `NewChromium` function to accept an `Options` argument
- Refactor `options` code to use a struct instead of multiple arguments
- Modify `filterExistDataPaths` to return data paths instead of `BrowserData`
- Add `Passwords` and `Cookies` functions to `chromium`
- Delete unused files and functions ` errors.go`, `cookie.go`, `browsingdata.go`, `consts.go`, `firefox.go`, `password.go`, `chromium_test.go`, `firefox_test.go`
- Improve error messages for keychain related issues
- Change `BrowserData.Passwords()` to `Passwords()` for simplification
- Remove unused code for browsers `Yandex` and `Edge`, and unused map `browsers` and methods `BrowsingData()` and `AllBrowsingData()` from chromium and firefox structs
- Add `DefaultDBHandler` and `DefaultJSONHandler` functions for SQLite3 queries
1 year ago
|
|
|
for _, options := range options {
|
|
|
|
options(opt)
|
|
|
|
}
|
|
|
|
|
refactor: Refactor project as library layout
- Add new files `bookmark.go`, `chromium_darwin.go`, `browserdata/cookie.go`, `browser_windows.go`, `browser_linux.go`, `datatype.go`, `password.go`, `browserdata/browserdata.go`, `chromium_linux.go`, `chromium_windows.go`
- Refactor `NewChromium` function to accept an `Options` argument
- Refactor `options` code to use a struct instead of multiple arguments
- Modify `filterExistDataPaths` to return data paths instead of `BrowserData`
- Add `Passwords` and `Cookies` functions to `chromium`
- Delete unused files and functions ` errors.go`, `cookie.go`, `browsingdata.go`, `consts.go`, `firefox.go`, `password.go`, `chromium_test.go`, `firefox_test.go`
- Improve error messages for keychain related issues
- Change `BrowserData.Passwords()` to `Passwords()` for simplification
- Remove unused code for browsers `Yandex` and `Edge`, and unused map `browsers` and methods `BrowsingData()` and `AllBrowsingData()` from chromium and firefox structs
- Add `DefaultDBHandler` and `DefaultJSONHandler` functions for SQLite3 queries
1 year ago
|
|
|
if opt.NewBrowserFunc == nil {
|
|
|
|
return nil, ErrBrowserNotSupport
|
|
|
|
}
|
|
|
|
return opt.NewBrowserFunc(opt)
|
|
|
|
}
|
|
|
|
|
refactor: Refactor project as library layout
- Add new files `bookmark.go`, `chromium_darwin.go`, `browserdata/cookie.go`, `browser_windows.go`, `browser_linux.go`, `datatype.go`, `password.go`, `browserdata/browserdata.go`, `chromium_linux.go`, `chromium_windows.go`
- Refactor `NewChromium` function to accept an `Options` argument
- Refactor `options` code to use a struct instead of multiple arguments
- Modify `filterExistDataPaths` to return data paths instead of `BrowserData`
- Add `Passwords` and `Cookies` functions to `chromium`
- Delete unused files and functions ` errors.go`, `cookie.go`, `browsingdata.go`, `consts.go`, `firefox.go`, `password.go`, `chromium_test.go`, `firefox_test.go`
- Improve error messages for keychain related issues
- Change `BrowserData.Passwords()` to `Passwords()` for simplification
- Remove unused code for browsers `Yandex` and `Edge`, and unused map `browsers` and methods `BrowsingData()` and `AllBrowsingData()` from chromium and firefox structs
- Add `DefaultDBHandler` and `DefaultJSONHandler` functions for SQLite3 queries
1 year ago
|
|
|
type browser string
|
|
|
|
|
|
|
|
const (
|
refactor: Refactor project as library layout
- Add new files `bookmark.go`, `chromium_darwin.go`, `browserdata/cookie.go`, `browser_windows.go`, `browser_linux.go`, `datatype.go`, `password.go`, `browserdata/browserdata.go`, `chromium_linux.go`, `chromium_windows.go`
- Refactor `NewChromium` function to accept an `Options` argument
- Refactor `options` code to use a struct instead of multiple arguments
- Modify `filterExistDataPaths` to return data paths instead of `BrowserData`
- Add `Passwords` and `Cookies` functions to `chromium`
- Delete unused files and functions ` errors.go`, `cookie.go`, `browsingdata.go`, `consts.go`, `firefox.go`, `password.go`, `chromium_test.go`, `firefox_test.go`
- Improve error messages for keychain related issues
- Change `BrowserData.Passwords()` to `Passwords()` for simplification
- Remove unused code for browsers `Yandex` and `Edge`, and unused map `browsers` and methods `BrowsingData()` and `AllBrowsingData()` from chromium and firefox structs
- Add `DefaultDBHandler` and `DefaultJSONHandler` functions for SQLite3 queries
1 year ago
|
|
|
Chrome browser = "chrome"
|
|
|
|
Firefox browser = "firefox"
|
|
|
|
Yandex browser = "yandex"
|
|
|
|
Edge browser = "edge"
|
|
|
|
Chromium browser = "chromium"
|
|
|
|
)
|
|
|
|
|
|
|
|
type browserType int
|
|
|
|
|
|
|
|
const (
|
|
|
|
browserTypeChromium browserType = iota + 1
|
|
|
|
browserTypeFirefox
|
|
|
|
browserTypeYandex
|
|
|
|
)
|
|
|
|
|
|
|
|
func (b browser) Type() browserType {
|
|
|
|
switch b {
|
|
|
|
case Firefox:
|
|
|
|
return browserTypeFirefox
|
|
|
|
case Yandex:
|
|
|
|
return browserTypeYandex
|
|
|
|
default:
|
|
|
|
return browserTypeChromium
|
|
|
|
}
|
|
|
|
}
|