13 lines
332 B
Python
13 lines
332 B
Python
|
from scapy.all import *
|
||
|
|
||
|
def display_arp(packet):
|
||
|
if packet.haslayer(ICMPv6ND_NS):
|
||
|
print("NS Packet:")
|
||
|
print("Source MAC", packet[Ether].hwsrc)
|
||
|
print("Source IP", packet[IPv6].psrc)
|
||
|
print("Target IP", packet[ICMPv6ND_NS].tgt)
|
||
|
print("="*30)
|
||
|
|
||
|
sniff(iface="eth1", prn=display_arp, store=0)
|
||
|
|