Socket Programming
1. Scan the target Vulnerable Server. And test it by telnet.
2. Write the scanner source code.
import socket ip = "10.0.0.32" for port in range(1,10000): try: s = socket.socket() s.connect((ip,port)) s.close() print "%d/tcp" %(port) except: pass
3. Execute the code. And the result is as following:
Python Hacking Tools - Port Scanner
原文:https://www.cnblogs.com/keepmoving1113/p/11330072.html