A função sniff em scapy em python2.7 funcionou bem antes de atualizar meu sistema operacional Linux.
from scapy.all import *
client_mac="c4:3d:c7:8f:03:19"
wlan_mac="00:c0:ca:6d:ac:fa"
sniff(iface="mon0",prn=packet_callback,filter="(ether dst "+client_mac+" and ether src "+wlan_mac+") or (ether src "+client_mac+" and ether dst "+wlan_mac+")")
Após a atualização, executei meu script novamente em python2.7 e recebi estas mensagens abaixo de scapy
WARNING: No route found for IPv6 destination :: (no default route?)
tcpdump: WARNING: eth0: no IPv4 address assigned
Como posso obter scapy para farejar a interface correta?
Eu tentei adicionar conf.iface="mon0"
acima da função sniff, mas ainda sem sorte.
usando ifconfig -a
recebi o seguinte
eth0 Link encap:Ethernet HWaddr 00:25:22:e9:b1:28
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:720 (720.0 B) TX bytes:720 (720.0 B)
mon0 Link encap:UNSPEC HWaddr 00-C0-CA-6D-AC-FA-3A-30-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:635 errors:0 dropped:638 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:192290 (187.7 KiB) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 00:c0:ca:6d:ac:fa
inet addr:192.168.1.7 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::2c0:caff:fe6d:acfa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:866 errors:0 dropped:0 overruns:0 frame:0
TX packets:811 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:385790 (376.7 KiB) TX bytes:99505 (97.1 KiB)