From 6886ef6978b2d07e9d8edc95449a24ec558f6016 Mon Sep 17 00:00:00 2001 From: Filipe Date: Fri, 6 May 2022 05:46:27 -0300 Subject: [PATCH] Update arp operation code Just added the operation code for arp-reply. The packages that were been sent were arp requests. It worked, but didn't match the comments and variable name. --- scapy/arp-spoofer/arp_spoof.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scapy/arp-spoofer/arp_spoof.py b/scapy/arp-spoofer/arp_spoof.py index 51b9fb5b..6179bdd5 100644 --- a/scapy/arp-spoofer/arp_spoof.py +++ b/scapy/arp-spoofer/arp_spoof.py @@ -79,7 +79,7 @@ def restore(target_ip, host_ip, verbose=True): # get the real MAC address of spoofed (gateway, i.e router) host_mac = get_mac(host_ip) # crafting the restoring packet - arp_response = ARP(pdst=target_ip, hwdst=target_mac, psrc=host_ip, hwsrc=host_mac) + arp_response = ARP(pdst=target_ip, hwdst=target_mac, psrc=host_ip, hwsrc=host_mac, op="is-at") # sending the restoring packet # to restore the network to its normal process # we send each reply seven times for a good measure (count=7) @@ -108,4 +108,4 @@ def restore(target_ip, host_ip, verbose=True): except KeyboardInterrupt: print("[!] Detected CTRL+C ! restoring the network, please wait...") restore(target, host) - restore(host, target) \ No newline at end of file + restore(host, target)