mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-10 15:23:41 -07:00
fixed debug logging output
This commit is contained in:
parent
0eda0eab12
commit
156222d775
3 changed files with 9 additions and 5 deletions
|
@ -24,6 +24,7 @@ class ArpSpoof(Plugin):
|
|||
self.setup = options.setup
|
||||
self.mac = get_if_hwaddr(self.interface)
|
||||
self.port = self.options.listen
|
||||
self.debug = False
|
||||
self.send = True
|
||||
|
||||
if os.geteuid() != 0:
|
||||
|
@ -32,6 +33,9 @@ class ArpSpoof(Plugin):
|
|||
if self.interface == None or self.routerip == None:
|
||||
sys.exit("[-] %s plugin requires --routerip and --interface" % self.name)
|
||||
|
||||
if self.options.log_level == 'debug':
|
||||
self.debug = True
|
||||
|
||||
print "[*] %s plugin online" % self.name
|
||||
if self.setup == True:
|
||||
print '[*] Setting up ip_forward and iptables'
|
||||
|
@ -54,13 +58,13 @@ class ArpSpoof(Plugin):
|
|||
else:
|
||||
sys.exit(0)
|
||||
|
||||
t = threading.Thread(name='send_packets', target=self.send_packets, args=(pkt,self.interface,))
|
||||
t = threading.Thread(name='send_packets', target=self.send_packets, args=(pkt,self.interface,self.debug,))
|
||||
t.setDaemon(True)
|
||||
t.start()
|
||||
|
||||
def send_packets(self,pkt,interface):
|
||||
def send_packets(self,pkt,interface, debug):
|
||||
while self.send == True:
|
||||
sendp(pkt, inter=2, iface=interface, verbose=False)
|
||||
sendp(pkt, inter=2, iface=interface, verbose=debug)
|
||||
|
||||
def build_req(self):
|
||||
if self.target == None:
|
||||
|
|
|
@ -168,7 +168,7 @@ class FilePwn(Plugin):
|
|||
logging.info("ZipFile size: %s KB" % (len(aZipFile) / 1024))
|
||||
|
||||
if len(aZipFile) > int(self.userConfig['ZIP']['maxSize']):
|
||||
logging.info("ZipFIle maxSize met %s", len(aZipFile))
|
||||
logging.info("ZipFIle maxSize met %s" % len(aZipFile))
|
||||
return aZipFile
|
||||
|
||||
tmpRan = ''.join(random.choice(string.ascii_lowercase + string.digits + string.ascii_uppercase) for _ in range(8))
|
||||
|
|
|
@ -32,7 +32,7 @@ class ResponseTampererFactory:
|
|||
pass
|
||||
|
||||
def createTamperer(configFile):
|
||||
logging.log(logging.DEBUG, "Reading tamper config file: %s" % (configFile))
|
||||
logging.debug(logging.DEBUG, "Reading tamper config file: %s" % (configFile))
|
||||
config = ResponseTampererFactory._default_config.copy()
|
||||
if configFile:
|
||||
config.update(ResponseTampererFactory.parseConfig(configFile))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue