python最简洁易懂的扫描端口代码.运行绝对会很有惊奇感 复制代码 代码如下:from threading import Thread, activeCount import socket import os def test_port(dst,port): os.system(‘title ‘+str(port)) cli_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: indicator = cli_sock.connect_ex((dst, port))