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: