So I\'m making a port scanner in python...
import socket ip = \"External IP\" s = socket.socket(2, 1) #socket.AF_INET, socket.SOCK_STREAM def porttry(ip, port):
Consider setting a timeout instead of a for loop by using socket.setdefaulttimeout(timeout).
socket.setdefaulttimeout(timeout)