core

package
v0.3.6-0...-2b37703 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Cookie   = "cookie"
	History  = "history"
	Bookmark = "bookmark"
)

Variables

This section is empty.

Functions

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

	// GetAllItems return all items (password|Bookmark|Cookie|History)
	GetAllItems() ([]data.Item, error)

	// GetItem return single one from the password|Bookmark|Cookie|History
	GetItem(itemName string) (data.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(name string) ([]Browser, error)

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) GetAllItems

func (c *Chromium) GetAllItems() ([]data.Item, error)

GetAllItems return all chromium items from browser if can't find the item path, log error then continue

func (*Chromium) GetItem

func (c *Chromium) GetItem(itemName string) (data.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) GetAllItems

func (f *Firefox) GetAllItems() ([]data.Item, error)

GetAllItems return all item with firefox

func (*Firefox) GetItem

func (f *Firefox) GetItem(itemName string) (data.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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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