Skip to content

Instantly share code, notes, and snippets.

@oddstr13
oddstr13 / arp_responder.py
Last active January 27, 2021 20:37 — forked from SupraJames/arp_responder.py
ARP responder using Python / scapy
#!/usr/bin/env python3
#
# Spoof ARP responses for list of IP Addresses / Networks
# Listens for ARP and responds with own MAC if the target is in list
#
# Allows routing of IP Addresses / subnets to a bridged VM network
# without access to the router config.
#
# Requires scapy (python3-scapy)
# https://scapy.readthedocs.io/en/latest/installation.html
#!/usr/bin/env python
import socket
TCP_IP = 'ukhas.net'
TCP_PORT = 3010
BUFFER_SIZE = 1024
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TCP_IP, TCP_PORT))