@@ -20,10 +20,11 @@ proc packageInstaller*() =
2020 echo " "
2121
2222 # Check if Python even exists
23+ var python: string = " "
2324 if execShellCmd (" python --version" ) == 0 :
24- let python = " python"
25+ python = " python"
2526 elif execShellCmd (" py --version" ) == 0 :
26- let python = " py"
27+ python = " py"
2728 else :
2829 stdout.styledWriteLine ({styleBright}, " - [FATAL] Python not installed!\n\n Would you like to download the recommended python installer? (Y/n): " )
2930 var input: char = getch ()
@@ -50,8 +51,8 @@ proc packageInstaller*() =
5051 discard execCmdEx (" python-setup.exe" )
5152 return
5253
53- stdout.styledWriteLine (fgGreen, {styleBright}, " - Python installed!" )
54- echo " "
54+ stdout.styledWriteLine (fgGreen, {styleBright}, " - Python installed!" )
55+ echo " "
5556
5657 # Check Python version, pyarmor no longer supports 3.11+
5758 stdout.styledWriteLine ({styleBright}, " [1] Checking for Python..." )
@@ -70,11 +71,12 @@ proc packageInstaller*() =
7071 discard execShellCmd (python & " -m venv NR_VENV" )
7172
7273 let venvPath: string = appDirectory / " NullRAT" / " NR_VENV"
74+ let result = execCmdEx (fmt""" cmd /c \"{ venvPath} \\Scripts\\activate && pip freeze\" """ )
7375 var allInstalled: bool = true
7476
7577 stdout.styledWriteLine ({styleBright}, " [2] Checking if packages already installed..." )
7678
77- if runInVenv (venvPath, " pip freeze " ) != 0 :
79+ if result .exitCode != 0 :
7880 echo " [FATAL] pip command failed to execute!!"
7981 sleep (2000 )
8082 else :
0 commit comments