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):
I think that this one snippet could help you : http://www.coderholic.com/python-port-scanner/