Python scapy中的VLAN嗅探

Python scapy中的VLAN嗅探,python,scapy,Python,Scapy,如果我在scapyshell中使用以下代码,VLAN嗅探就可以工作 非常好 conf.use_pcap=True import scapy.arch.pcapdnet p=sniff(iface='enp3s0', count=20, timeout=15) if p: for i in p: i.show() 如果我在python shell中使用了相同的代码(使用scapy.all import*中的附加作为第一次

如果我在scapyshell中使用以下代码,VLAN嗅探就可以工作 非常好

    conf.use_pcap=True
    import scapy.arch.pcapdnet

    p=sniff(iface='enp3s0', count=20, timeout=15)

    if p:
        for i in p:
            i.show()
如果我在python shell中使用了相同的代码(使用scapy.all import*中的附加
作为第一次导入),那么代码不会嗅探
任何一包

你知道如何克服这个问题吗