88 "github.com/spf13/cobra"
99
1010 "github.com/moond4rk/hackbrowserdata/browser"
11+ "github.com/moond4rk/hackbrowserdata/crypto"
1112 "github.com/moond4rk/hackbrowserdata/log"
1213 "github.com/moond4rk/hackbrowserdata/output"
1314 "github.com/moond4rk/hackbrowserdata/types"
@@ -22,6 +23,7 @@ func dumpCmd() *cobra.Command {
2223 outputDir string
2324 profilePath string
2425 keychainPw string
26+ abeKey string
2527 compress bool
2628 )
2729
@@ -34,6 +36,12 @@ func dumpCmd() *cobra.Command {
3436 hack-browser-data dump -f cookie-editor
3537 hack-browser-data dump --zip` ,
3638 RunE : func (cmd * cobra.Command , args []string ) error {
39+ if abeKey != "" {
40+ if err := crypto .SetABEMasterKeyFromHex (abeKey ); err != nil {
41+ return fmt .Errorf ("--abe-key: %w" , err )
42+ }
43+ }
44+
3745 browsers , err := browser .PickBrowsers (browser.PickOptions {
3846 Name : browserName ,
3947 ProfilePath : profilePath ,
@@ -86,6 +94,9 @@ func dumpCmd() *cobra.Command {
8694 cmd .Flags ().StringVarP (& outputDir , "dir" , "d" , "results" , "output directory" )
8795 cmd .Flags ().StringVarP (& profilePath , "profile-path" , "p" , "" , "custom profile dir path, get with chrome://version" )
8896 cmd .Flags ().StringVar (& keychainPw , "keychain-pw" , "" , "macOS keychain password" )
97+ cmd .Flags ().StringVarP (& abeKey , "abe-key" , "k" , "" ,
98+ "Windows only: pre-decrypted Chrome ABE master key (64 hex chars / 32 bytes). " +
99+ "When set, skips the in-process elevation_service injection." )
89100 cmd .Flags ().BoolVar (& compress , "zip" , false , "compress output to zip" )
90101
91102 return cmd
0 commit comments