In this post I will speak about how to create Port Scanner in python 3
First thing for every system Administrator or hacking make scan for network then found all open port for every Host.
i speak in the last post about create Ip Scanner in python .
Today we will create second script in python to make port scan on Ip and found all open port on this IP.
from queue import Queue
print_lock = threading.Lock()
target = input('Enter ip Address: ')
maxport = int(input('Enter the max Number port to scan: '))
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
con = s.connect((target,port))
worker = q.get()
# Run the example job with the avail worker in queue (thread) portscan(worker) # completed with the job q.task_done()
q = Queue()
for x in range(100):
t = threading.Thread(target=threader)
# classifying as a daemon, so they will die when the main dies t.daemon = True # begins, must come after daemon definition t.start()
start = time.time()
for worker in range(1,maxport):