Restoring ARP tables manually
Now that we have seen how to successfully spoof packets, when we close our program by using a keyboard interrupt, such as Ctrl + C, we will see that the internet becomes unavailable again on our Windows machine. This is because the ARP tables have been poisoned and we haven't restored them, so they don't know where to route the network traffic. This will automatically reset itself after a couple of minutes. However, this can raise suspicion for the victim, and they might realize that someone is tampering with their network traffic. To avoid this, we can restore these tables by sending over correct information when we exit the program. We can use the following program to restore the correct values:
def restore():     # restoring router table     arp_response = ARP()     arp_response.op = 2     arp_response.pdst = "192.168.74.2"     ...