내 Linux OS를 업그레이드하기 전에는 python2.7의 scapy의 스니핑 기능이 제대로 작동했습니다.
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+")")
업그레이드 후 python2.7에서 스크립트를 다시 실행했고 scapy로부터 다음 메시지를 받았습니다.
WARNING: No route found for IPv6 destination :: (no default route?)
tcpdump: WARNING: eth0: no IPv4 address assigned
올바른 인터페이스를 스니핑하려면 어떻게 해야 합니까?
위에서 스니핑 기능을 추가해 보았지만 conf.iface="mon0"
여전히 성공하지 못했습니다.
ifconfig -a
사용
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)