Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- # encoding: utf-8
- """
- An ill-advised way to amuse yourself at DEFCON
- Run nmap against anyone who tries to telnet in
- mi100hael - 2017/07/27
- """
- import time
- import socket
- import subprocess
- HOST = ""
- PORT = 23
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.bind((HOST, PORT))
- s.listen(10)
- print("Listening on {}:{}...".format(HOST, PORT))
- while True:
- conn, addr = s.accept()
- print("Received connection from {0[0]}:{0[1]}".format(addr))
- subprocess.Popen("nohup nmap -A -T5 {0} > {0}.out 2>&1 &".format(addr[0]), shell=True)
- conn.sendall(b"Initiating client exploit...\n")
- time.sleep(3)
- conn.sendall(b"Done! You've bene pwnd!\n")
- conn.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement