python局域网ip扫描示例分享
复制代码 代码如下:#!/usr/bin/python# -*- coding: utf-8 -*- from scapy.all import *from time import ctime,sleepimport threadingTIMEOUT = 4conf.verb=0 def pro(cc,handle): dst = “192.168.1.” + str(cc) packet = IP(dst=dst, ttl=20)/ICMP() reply = sr1(packet, timeout=TIMEOUT) if not (reply is None): handle.write
下载地址
用户评论