python 扫描端口_python编写端口扫描

如何扫描网络中的端口 python
from socket import socket
def scan_address(host, port):
s = socket()
s.settimeout(3)
try:
s.connect((host, port))
except:
return False
s.close()
279
0
2023-03-22
端口扫描