profileur-cli 2.0.2 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extractor_cli.js +28 -3
- package/package.json +1 -1
package/extractor_cli.js
CHANGED
|
@@ -79,6 +79,26 @@ try {
|
|
|
79
79
|
process.exit(1);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
// --- Default Browser Definitions (for CLI only) ---
|
|
83
|
+
const DEFAULT_BROWSERS = {
|
|
84
|
+
chrome: {
|
|
85
|
+
path: path.join(process.env.LOCALAPPDATA || '', 'Google', 'Chrome', 'User Data'),
|
|
86
|
+
name: 'Google Chrome'
|
|
87
|
+
},
|
|
88
|
+
'chrome-beta': {
|
|
89
|
+
path: path.join(process.env.LOCALAPPDATA || '', 'Google', 'Chrome Beta', 'User Data'),
|
|
90
|
+
name: 'Google Chrome Beta'
|
|
91
|
+
},
|
|
92
|
+
edge: {
|
|
93
|
+
path: path.join(process.env.LOCALAPPDATA || '', 'Microsoft', 'Edge', 'User Data'),
|
|
94
|
+
name: 'Microsoft Edge'
|
|
95
|
+
},
|
|
96
|
+
brave: {
|
|
97
|
+
path: path.join(process.env.LOCALAPPDATA || '', 'BraveSoftware', 'Brave-Browser', 'User Data'),
|
|
98
|
+
name: 'Brave Browser'
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
82
102
|
// --- Helper Functions ---
|
|
83
103
|
|
|
84
104
|
/**
|
|
@@ -348,11 +368,16 @@ function extractPasswords(profilePath, outputDir, key) {
|
|
|
348
368
|
*/
|
|
349
369
|
function main(options = {}) {
|
|
350
370
|
const outputBaseDir = options.outputDir || options.outputBaseDir || 'extracted_data';
|
|
351
|
-
|
|
371
|
+
let browsers = options.browsers || {};
|
|
352
372
|
|
|
353
373
|
if (!browsers || Object.keys(browsers).length === 0) {
|
|
354
|
-
|
|
355
|
-
|
|
374
|
+
// If called as a CLI (node extractor_cli.js or via bin), fall back to defaults
|
|
375
|
+
if (require.main === module) {
|
|
376
|
+
browsers = DEFAULT_BROWSERS;
|
|
377
|
+
} else {
|
|
378
|
+
error("No browsers configuration provided. Please pass options.browsers = { <key>: { path, name } }.");
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
356
381
|
}
|
|
357
382
|
log("=== Universal Browser Data Extractor CLI (ABE) ===");
|
|
358
383
|
log("Version 1.0.0");
|
package/package.json
CHANGED