zoukankan      html  css  js  c++  java
  • python绝技 — 侦听802.11 Probe请求

     代码

    #!/usr/bin/python
    #--*--coding=utf-8--*--
    
    from scapy.all import *
    interface = 'wlan1'
    probeReqs = []
    
    def sniffProbes(pkt):
        if pkt.haslayer(Dot11ProbeReq):
            netName = pkt.getlayer(Dot11ProbeReq).info
            if netName not in probeReqs:
                probeReqs.append(netName)
                print '[+] Detected Probe Request: ' + netName 
    
    sniff(iface = interface, prn=sniffProbes)

    运行需要先将网卡设置为混杂模式,如wlan1:

    sudo ifconfig wlan1 down
    sudo iwconfig wlan1 mode monitor
    sudo ifconfig wlan1 up

    然后以管理员权限运行脚本

    运行结果

  • 相关阅读:
    Java-循环语句和条件语句
    Java-变量函数 上
    python
    python
    python
    Xpath
    python + selenium
    python + selenium
    python + selenium
    Web
  • 原文地址:https://www.cnblogs.com/ssooking/p/6095205.html
Copyright © 2011-2022 走看看