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.setup = options.setup
self.mac = get_if_hwaddr(self.interface) self.mac = get_if_hwaddr(self.interface)
self.port = self.options.listen self.port = self.options.listen
self.debug = False
self.send = True self.send = True
if os.geteuid() != 0: if os.geteuid() != 0:
@ -32,6 +33,9 @@ class ArpSpoof(Plugin):
if self.interface == None or self.routerip == None: if self.interface == None or self.routerip == None:
sys.exit("[-] %s plugin requires --routerip and --interface" % self.name) 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 print "[*] %s plugin online" % self.name
if self.setup == True: if self.setup == True:
print '[*] Setting up ip_forward and iptables' print '[*] Setting up ip_forward and iptables'
@ -54,13 +58,13 @@ class ArpSpoof(Plugin):
else: else:
sys.exit(0) 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.setDaemon(True)
t.start() t.start()
def send_packets(self,pkt,interface): def send_packets(self,pkt,interface, debug):
while self.send == True: while self.send == True:
sendp(pkt, inter=2, iface=interface, verbose=False) sendp(pkt, inter=2, iface=interface, verbose=debug)
def build_req(self): def build_req(self):
if self.target == None: if self.target == None:

View file

@ -168,7 +168,7 @@ class FilePwn(Plugin):
logging.info("ZipFile size: %s KB" % (len(aZipFile) / 1024)) logging.info("ZipFile size: %s KB" % (len(aZipFile) / 1024))
if len(aZipFile) > int(self.userConfig['ZIP']['maxSize']): 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 return aZipFile
tmpRan = ''.join(random.choice(string.ascii_lowercase + string.digits + string.ascii_uppercase) for _ in range(8)) 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 pass
def createTamperer(configFile): 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() config = ResponseTampererFactory._default_config.copy()
if configFile: if configFile:
config.update(ResponseTampererFactory.parseConfig(configFile)) config.update(ResponseTampererFactory.parseConfig(configFile))