11@ echo off & @ title NullRAT Compiler & @ color A
22mode con: cols=87 lines=30
33setlocal EnableDelayedExpansion
4+ chcp 65001
45
56:start
67cls
@@ -18,19 +19,19 @@ echo -----------
1819echo .
1920
2021choice /c YN /n /m " Do you want to obfuscate the executable? [Y/N]: "
21- if %errorlevel% == 1 (set pyarmor=yes) else (set pyarmor=no)
22+ if %errorlevel% == 1 (set " pyarmor=yes" ) else (set " pyarmor=no" )
2223
2324choice /c YN /n /m " Do you want to compress the executable? [Y/N]: "
24- if %errorlevel% == 1 (set upxdd=yes) else (set upxdd=no)
25+ if %errorlevel% == 1 (set " upxdd=yes" ) else (set " upxdd=no" )
2526
2627choice /c YN /n /m " Do you want to add a custom icon? [Y/N]: "
27- if %errorlevel% == 1 (set icon=yes) else (set icon=no)
28+ if %errorlevel% == 1 (set " icon=yes" ) else (set " icon=no" )
2829
29- echo . & echo All options selected: & echo ------------------------------------------
30- echo Obfuscating the executable=%pyarmor%
31- echo Compressing the executable=%upxdd%
32- echo Adding a custom icon to the executable=%icon%
33- echo ------------------------------------------
30+ echo . & echo All options selected: & echo --------------------------------------------
31+ echo Obfuscating the executable=" %pyarmor% "
32+ echo Compressing the executable=" %upxdd% "
33+ echo Adding a custom icon to the executable=" %icon% "
34+ echo --------------------------------------------
3435
3536echo . & choice /c YN /n /m " Are all these options correct? [Y/N]: "
3637if %errorlevel% == 2 (goto start) else (goto compile)
@@ -51,26 +52,26 @@ echo ^|_^|
5152
5253echo ==================================================================================== & echo .
5354
54- cd " %~dp0 NullRAT \"
55- if % icon% == yes (
55+ cd " %~dp0 \NullRAT \"
56+ if " ! icon! " == " yes" (
5657 set /P " iconP = Please type the path of the custom icon: "
57- move " !iconP! " " %~dp0 NullRAT \custom_icon.ico"
58+ move " !iconP! " " %~dp0 \NullRAT \custom_icon.ico"
5859)
59- if % upxdd% == yes (set path=% path% ;%~dp0 NullRAT\ upx)
60+ if " ! upxdd! " == " yes" (set " path=! path! ;%~dp0 \NullRAT\ upx" )
6061
61- if % pyarmor% == yes (
62- if % icon% == yes (
62+ if " ! pyarmor! " == " yes" (
63+ if " ! icon! " == " yes" (
6364 pyarmor pack -e " --onefile --noconsole --icon=custom_icon.ico " RAT.py
6465 ) else (
6566 pyarmor pack -e " --onefile --noconsole " RAT.py
6667 )
6768) else (
68- if % icon% == yes (
69+ if " ! icon! " == " yes" (
6970 pyinstaller --onefile --noconsole --icon=custom_icon.ico RAT.py
7071 ) else (
7172 pyinstaller --onefile --noconsole RAT.py
7273 )
7374)
7475
75- move dist\RAT.exe " %~dp0 " & echo .
76+ move dist\RAT.exe " %~dp0 \ " & echo .
7677timeout /t 5 & EXIT
0 commit comments