0
我的代碼,我試圖幫助捕捉如下:無線數據分組與Scapy的
from scapy.all import *
def PacketHandler(pkt) :
if pkt.haslayer == 2 and pkt.subtype==0:
if pkt.haslayer(IP) :
ip=pkt.getlayer(IP)
print ip.dst
if pkt.haslayer(UDP):
udp=pkt.getlayer(UDP)
print udp.dport
if pkt.haslayer(TCP) :
tcp=pkt.getlayer(TCP)
print tcp.port
sniff(iface="mon0", prn=PacketHandler)
利用這一點,我想捕捉所有無線數據包,但我只得到組播(IP/UDP)數據包。那麼我怎樣才能在我的無線網絡中獲得所有的數據包?我已經在我的接入點上禁用了加密(暫時),所以我可以訪問數據包中的數據。
你可以在'mon0'接口上用'wireshark'看到它們嗎? –
我認爲你必須嗅探混雜模式https://en.wikipedia.org/wiki/Promiscuous_mode另外,請注意,並非所有的網絡適配器都支持混雜模式。 –
@OmidRaha:是的,我可以在mont0接口上的wireshark上看到它們...... – user3292475