mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-06 05:53:25 +01:00
fix: report unreadable sources and tidy the pipeline (#675)
A Stat error other than not-exist was reported as absent, and the --zip archive was readable by other users. The rest is review follow-up: export no longer prints, one runner type, shared name helpers, a trimmed log API.
This commit is contained in:
1 parent
6d6191b4c6
commit
4e98ba7884
33 files changed
+303
-315
No files matched your search
@@ -47,6 +47,15 @@ func All() []Category {
|
||||
return []Category{Password, Cookie, Bookmark, History, Download, CreditCard, Extension, LocalStorage, SessionStorage}
|
||||
}
|
||||
|
||||
func Names() []string {
|
||||
all := All()
|
||||
names := make([]string, len(all))
|
||||
for i, c := range all {
|
||||
names[i] = c.String()
|
||||
}
|
||||
return names
|
||||
}
|
||||
|
||||
func Parse(s string) (Category, error) {
|
||||
for _, c := range All() {
|
||||
if c.String() == s {
|
||||
|
||||
@@ -60,3 +60,9 @@ func TestZeroIsNone(t *testing.T) {
|
||||
var c Category
|
||||
assert.NotContains(t, All(), c)
|
||||
}
|
||||
|
||||
func TestNames(t *testing.T) {
|
||||
assert.Equal(t, []string{
|
||||
"password", "cookie", "bookmark", "history", "download", "creditcard", "extension", "localstorage", "sessionstorage",
|
||||
}, Names())
|
||||
}
|
||||
Reference in new issue
Block a user