找不到Scapy Dot11

2024-09-29 07:27:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我好像无法访问Dot11。我的设置如下:

  1. Kali Linux虚拟机映像
  2. Scapy安装方式:pip install git+https://github.com/secdev/scapy
  3. Pycharm运行python3.6

剧本:

from scapy.all import *

def packethandler(pkt):
    if pkt.haslayer(Dot11):
        print("hello")

sniff(iface="wlan0mon",prn=packethandler,store=0,monitor=True)

Dot11已标记,未找到。但是,我能够做到以下几点:

^{pr2}$

它反过来又实际工作并找到802.11包。有人能帮我吗?在


Tags: installpiphttpsgitgithubcomlinux方式
1条回答
网友
1楼 · 发布于 2024-09-29 07:27:39

为了避免使用通配符导入,请尝试以下操作:

from scapy.layers.dot11 import Dot11
from scapy.sendrecv import sniff

def packethandler(pkt):
    if pkt.haslayer(Dot11):
        print("hello")

sniff(iface="wlan0mon",prn=packethandler,store=0,monitor=True)

相关问题 更多 >