fixed debug logging output

This commit is contained in:
byt3bl33d3r 2014-07-14 09:10:45 +02:00
parent 0eda0eab12
commit 156222d775
3 changed files with 9 additions and 5 deletions

View file

@ -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:

View file

@ -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))

View file

@ -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))