browser

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChromePasswordFile = "Login Data"
	FirefoxKey4File    = "key4.db"
	FirefoxLoginFile   = "logins.json"
)

Variables

This section is empty.

Functions

func GetBrowserData added in v0.0.2

func GetBrowserData() []common.BrowserPassword

func ListBrowser

func ListBrowser() []string

func ListItem

func ListItem() []string

Types

type Browser

type Browser interface {
	// InitSecretKey is init chrome secret key, firefox's key always empty
	InitSecretKey() error

	// GetName return browser name
	GetName() string

	// GetSecretKey return browser secret key
	GetSecretKey() []byte

	// GetItem return password
	GetItem() (Item, error)
}

func NewChromium

func NewChromium(profile, key, name, storage string) (Browser, error)

NewChromium return Chromium browser interface

func NewFirefox

func NewFirefox(profile, key, name, storage string) (Browser, error)

NewFirefox return firefox browser interface

func PickBrowser

func PickBrowser() (browsers []Browser)

PickBrowser return a list of browser interface

func PickCustomBrowser

func PickCustomBrowser(browserName, cusProfile, cusKey string) ([]Browser, error)

PickCustomBrowser pick single browser with custom browser profile path and key file path (windows only). If custom key file path is empty, but the current browser requires key file (chromium for windows version > 80) key file path will be automatically found in the profile path's parent directory.

type Chromium

type Chromium struct {
	// contains filtered or unexported fields
}

func (*Chromium) GetItem

func (c *Chromium) GetItem() (Item, error)

GetItem return single item

func (*Chromium) GetName

func (c *Chromium) GetName() string

func (*Chromium) GetSecretKey

func (c *Chromium) GetSecretKey() []byte

func (*Chromium) InitSecretKey

func (c *Chromium) InitSecretKey() error

type Firefox

type Firefox struct {
	// contains filtered or unexported fields
}

func (*Firefox) GetItem

func (f *Firefox) GetItem() (Item, error)

func (*Firefox) GetName

func (f *Firefox) GetName() string

func (*Firefox) GetSecretKey

func (f *Firefox) GetSecretKey() []byte

GetSecretKey for firefox is always nil this method used to implement Browser interface

func (*Firefox) InitSecretKey

func (f *Firefox) InitSecretKey() error

InitSecretKey for firefox is always nil this method used to implement Browser interface

type Item

type Item interface {
	// ChromeParse parse chrome items, Password need secret key
	ChromeParse(key []byte) error

	// FirefoxParse parse firefox items
	FirefoxParse() error

	// OutPut file name and format type
	OutPut(browser string, res map[string][]interface{}) error

	// CopyDB is copy item db file to current dir
	CopyDB() error

	// Release is delete item db file
	Release() error
}

func NewCPasswords

func NewCPasswords(main, sub string) Item

func NewFPasswords

func NewFPasswords(main, sub string) Item

type LoginData

type LoginData struct {
	UserName string

	Password   string
	LoginUrl   string
	CreateDate time.Time
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL