使用python实现扫描端口示例
python最简洁易懂的扫描端口代码.运行绝对会很有惊奇感 复制代码 代码如下: from threading import Thread,activeCount import socket import os def test_port(dst,port): os.system('title '+str(port)) try: if indicator == 0: print(port) cli_sock.close() except:
dst = '192.168.0.22' while i < 65536: if activeCount() <= 200: Thread(target = test_port,args = (dst,i)).start() while True: if activeCount() == 2: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |