I'm using Python3.6 on a Windows 7 Machine with Scapy.
I wanted to set up a system that intercepts traffic on the network and logs it, and potentially to venture into filtering it maybe. My ARP poisoning and logging works perfectly fine, but my attempt to restore the connection after seems to always fail and I have to manually reconnect to the network on the system I was ARP'ing.
Heres my code:
I was originally trying to flush it out like so, but to no avail:
I'm still learning about networking, so it may be something obvious, but nothing from google could help me. Any sort of pointers in the right direction would be greatly appreciated!
I wanted to set up a system that intercepts traffic on the network and logs it, and potentially to venture into filtering it maybe. My ARP poisoning and logging works perfectly fine, but my attempt to restore the connection after seems to always fail and I have to manually reconnect to the network on the system I was ARP'ing.
Heres my code:
Code
def restore_network(gateway_ip, gateway_mac, target_ip, target_mac):
send(ARP(op=2, hwdst=gateway_mac, pdst=gateway_ip, hwsrc=target_mac, psrc=target_ip), count=4)
send(ARP(op=2, hwdst=target_mac, pdst=target_ip, hwsrc=gateway_mac, psrc=gateway_ip), count=4)I was originally trying to flush it out like so, but to no avail:
Code
def restore_network(gateway_ip, gateway_mac, target_ip, target_mac):
send(ARP(op=2, hwdst="ff:ff:ff:ff:ff:ff", pdst=gateway_ip, hwsrc=target_mac, psrc=target_ip), count=4)
send(ARP(op=2, hwdst="ff:ff:ff:ff:ff:ff", pdst=target_ip, hwsrc=gateway_mac, psrc=gateway_ip), count=4)I'm still learning about networking, so it may be something obvious, but nothing from google could help me. Any sort of pointers in the right direction would be greatly appreciated!
previously known as Sin/Sin+
![[Image: De7wpim.gif]](https://i.imgur.com/De7wpim.gif)



