Making a Fast Port Scanner

前端 未结 9 730
眼角桃花
眼角桃花 2021-02-03 12:48

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):         


        
9条回答
  •  清歌不尽
    2021-02-03 13:36

    Consider setting a timeout instead of a for loop by using socket.setdefaulttimeout(timeout).

提交回复
热议问题