Send ICMP to update ARP/NDP target’s cache
parent
52dc461d28
commit
833a06ce8d
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
from scapy.all import *
|
||||
|
||||
etherDest= sys.argv[1]
|
||||
iface= sys.argv[2]
|
||||
|
||||
ipDest= sys.argv[3]
|
||||
ipSrc= sys.argv[4]
|
||||
|
||||
# send 10 IPv4 ICMP echo requests
|
||||
sendp(Ether(dst=etherDest)/IP(dst=ipDest, src=ipSrc, ttl=(1,10))/ICMP(), iface=iface)
|
||||
|
||||
ipDest= sys.argv[5]
|
||||
ipSrc= sys.argv[6]
|
||||
|
||||
# send 10 IPv6 ICMP echo requests
|
||||
sendp(Ether(dst=etherDest)/IPv6(dst=ipDest, src=ipSrc, hlim=(1,10))/ICMPv6EchoRequest(), iface=iface)
|
Loading…
Reference in New Issue