mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-08-20 00:07:11 +02:00
refactor: naming cleanup and crypto package improvements (#551)
* refactor: naming cleanup across all packages
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
|
||||
"github.com/moond4rk/hackbrowserdata/types"
|
||||
"github.com/moond4rk/hackbrowserdata/utils/sqliteutil"
|
||||
"github.com/moond4rk/hackbrowserdata/utils/typeutil"
|
||||
)
|
||||
|
||||
const firefoxDownloadQuery = `SELECT place_id, GROUP_CONCAT(content), url, dateAdded
|
||||
@@ -27,7 +26,7 @@ func extractDownloads(path string) ([]types.DownloadEntry, error) {
|
||||
|
||||
entry := types.DownloadEntry{
|
||||
URL: url,
|
||||
StartTime: typeutil.TimeStamp(dateAdded / 1000000),
|
||||
StartTime: timestamp(dateAdded / 1000000),
|
||||
}
|
||||
|
||||
// Firefox stores download metadata as: "target_path,{json}"
|
||||
@@ -37,7 +36,7 @@ func extractDownloads(path string) ([]types.DownloadEntry, error) {
|
||||
entry.TargetPath = contentList[0]
|
||||
json := "{" + contentList[1]
|
||||
entry.TotalBytes = gjson.Get(json, "fileSize").Int()
|
||||
entry.EndTime = typeutil.TimeStamp(gjson.Get(json, "endTime").Int() / 1000)
|
||||
entry.EndTime = timestamp(gjson.Get(json, "endTime").Int() / 1000)
|
||||
} else {
|
||||
entry.TargetPath = content
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user