Machen ein Schneller Port-Scanner

Also ich mache einen port-scanner in python...

import socket
ip = "External IP"
s = socket.socket(2, 1) #socket.AF_INET, socket.SOCK_STREAM

def porttry(ip, port):
    try:
        s.connect((ip, port))
        return True
    except:
        return None

for port in range(0, 10000):
    value = porttry(ip, port)
    if value == None:
        print("Port not opened on %d" % port)
    else:
        print("Port opened on %d" % port)
        break
raw_input()

Aber das ist zu langsam, ich will irgendwie in der Lage sein, zu einigen, wie nah oder break-code nach einer gewissen Zeit nicht zurück, nichts.

InformationsquelleAutor Shane | 2014-10-03

Schreibe einen Kommentar