package data
import "time"
type BrowsingData interface {
Parse ( masterKey [ ] byte ) error
Name ( ) string
}
const (
queryChromiumCredit = ` SELECT guid, name_on_card, expiration_month, expiration_year, card_number_encrypted FROM credit_cards `
queryChromiumLogin = ` SELECT origin_url, username_value, password_value, date_created FROM logins `
queryChromiumHistory = ` SELECT url, title, visit_count, last_visit_time FROM urls `
queryChromiumDownload = ` SELECT target_path, tab_url, total_bytes, start_time, end_time, mime_type FROM downloads `
queryChromiumCookie = ` SELECT name, encrypted_value, host_key, path, creation_utc, expires_utc, is_secure, is_httponly, has_expires, is_persistent FROM cookies `
queryFirefoxHistory = ` SELECT id, url, last_visit_date, title, visit_count FROM moz_places where title not null `
queryFirefoxDownload = ` SELECT place_id, GROUP_CONCAT(content), url, dateAdded FROM (SELECT * FROM moz_annos INNER JOIN moz_places ON moz_annos.place_id=moz_places.id) t GROUP BY place_id `
queryFirefoxBookMark = ` SELECT id, url, type, dateAdded, title FROM (SELECT * FROM moz_bookmarks INNER JOIN moz_places ON moz_bookmarks.fk=moz_places.id) `
queryFirefoxCookie = ` SELECT name, value, host, path, creationTime, expiry, isSecure, isHttpOnly FROM moz_cookies `
queryMetaData = ` SELECT item1, item2 FROM metaData WHERE id = 'password' `
queryNssPrivate = ` SELECT a11, a102 from nssPrivate `
closeJournalMode = ` PRAGMA journal_mode=off `
)
type (
loginData struct {
UserName string
encryptPass [ ] byte
encryptUser [ ] byte
Password string
LoginUrl string
CreateDate time . Time
}
bookmark struct {
ID int64
Name string
Type string
URL string
DateAdded time . Time
}
cookie struct {
Host string
Path string
KeyName string
encryptValue [ ] byte
Value string
IsSecure bool
IsHTTPOnly bool
HasExpire bool
IsPersistent bool
CreateDate time . Time
ExpireDate time . Time
}
history struct {
Title string
Url string
VisitCount int
LastVisitTime time . Time
}
download struct {
TargetPath string
Url string
TotalBytes int64
StartTime time . Time
EndTime time . Time
MimeType string
}
card struct {
GUID string
Name string
ExpirationYear string
ExpirationMonth string
CardNumber string
}
)