Cleaning up imports, fixing a few bugs.
This commit is contained in:
@@ -314,7 +314,7 @@ class Aireplay(Thread):
|
||||
if out.strip() == 'Wrote packet to: %s' % forged_file:
|
||||
return forged_file
|
||||
else:
|
||||
from Color import Color
|
||||
from ..util.color import Color
|
||||
Color.pl('{!} {R}failed to forge packet from .xor file{W}')
|
||||
Color.pl('output:\n"%s"' % out)
|
||||
return None
|
||||
@@ -385,7 +385,7 @@ if __name__ == '__main__':
|
||||
t = WEPAttackType(t)
|
||||
print t.name, type(t.name), t.value
|
||||
|
||||
from Target import Target
|
||||
from ..model.target import Target
|
||||
fields = 'A4:2B:8C:16:6B:3A, 2015-05-27 19:28:44, 2015-05-27 19:28:46, 6, 54e, WEP, WEP, , -58, 2, 0, 0. 0. 0. 0, 9, Test Router Please Ignore, '.split(',')
|
||||
t = Target(fields)
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/python2.7
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from wifite.util.process import Process
|
||||
from wifite.config import Configuration
|
||||
from wifite.model.target import Target
|
||||
from wifite.model.client import Client
|
||||
from wifite.tools.tshark import Tshark
|
||||
from .tshark import Tshark
|
||||
from ..util.process import Process
|
||||
from ..config import Configuration
|
||||
from ..model.target import Target
|
||||
from ..model.client import Client
|
||||
|
||||
import os, time
|
||||
|
||||
@@ -278,7 +278,7 @@ class Airodump(object):
|
||||
self.decloaking = True
|
||||
self.decloaked_times[target.bssid] = now
|
||||
if Configuration.verbose > 1:
|
||||
from Color import Color
|
||||
from ..util.color import Color
|
||||
verbout = " [?] Deauthing %s" % target.bssid
|
||||
verbout += " (broadcast & %d clients)" % len(target.clients)
|
||||
Color.pe("\n{C}" + verbout + "{W}")
|
||||
@@ -296,7 +296,7 @@ if __name__ == '__main__':
|
||||
from time import sleep
|
||||
sleep(7)
|
||||
|
||||
from Color import Color
|
||||
from ..util.color import Color
|
||||
|
||||
targets = airodump.get_targets()
|
||||
for idx, target in enumerate(targets, start=1):
|
||||
|
||||
@@ -217,7 +217,7 @@ class Bully(Attack):
|
||||
if __name__ == '__main__':
|
||||
stdout = " [*] Pin is '11867722', key is '9a6f7997'"
|
||||
Configuration.initialize(False)
|
||||
from Target import Target
|
||||
from ..model.target import Target
|
||||
fields = 'AA:BB:CC:DD:EE:FF,2015-05-27 19:28:44,2015-05-27 19:28:46,1,54,WPA2,CCMP TKIP,PSK,-58,2,0,0.0.0.0,9,HOME-ABCD,'.split(',')
|
||||
target = Target(fields)
|
||||
b = Bully(target)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/python2.7
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from wifite.model.interface import Interface
|
||||
from wifite.util.color import Color
|
||||
from ..model.interface import Interface
|
||||
from ..util.color import Color
|
||||
|
||||
class Macchanger(object):
|
||||
is_init = False
|
||||
@@ -12,7 +12,7 @@ class Macchanger(object):
|
||||
@classmethod
|
||||
def init(cls):
|
||||
if cls.is_init: return
|
||||
from Configuration import Configuration
|
||||
from ..config import Configuration
|
||||
iface = Configuration.interface
|
||||
if type(iface) == Interface:
|
||||
iface = iface.name
|
||||
@@ -21,8 +21,8 @@ class Macchanger(object):
|
||||
@classmethod
|
||||
def down_macch_up(cls, macch_option):
|
||||
cls.init()
|
||||
from Process import Process
|
||||
from Configuration import Configuration
|
||||
from ..util.process import Process
|
||||
from ..config import Configuration
|
||||
iface = Configuration.interface
|
||||
|
||||
cmd = ["ifconfig", iface, "down"]
|
||||
@@ -61,7 +61,7 @@ class Macchanger(object):
|
||||
# --permanent to reset to permanent MAC address
|
||||
if not cls.down_macch_up("-p"): return
|
||||
Color.pl("\r{+} {C}macchanger{W}: Resetting MAC address...")
|
||||
from Configuration import Configuration
|
||||
from ..config import Configuration
|
||||
new_mac = Interface.get_mac(Configuration.interface)
|
||||
Color.clear_entire_line()
|
||||
Color.pl("\r{+} {C}macchanger{W}: Reset MAC address back to {C}%s{W}" % new_mac)
|
||||
@@ -71,7 +71,7 @@ class Macchanger(object):
|
||||
# Use --permanent to use random MAC address
|
||||
if not cls.down_macch_up("-r"): return
|
||||
cls.is_changed = True
|
||||
from Configuration import Configuration
|
||||
from ..config import Configuration
|
||||
new_mac = Interface.get_mac(Configuration.interface)
|
||||
Color.clear_entire_line()
|
||||
Color.pl("\r{+} {C}macchanger{W}: Changed MAC address to {C}%s{W}" % new_mac)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python2.7
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from wifite.util.process import Process
|
||||
from ..util.process import Process
|
||||
import re
|
||||
|
||||
class Tshark(object):
|
||||
@@ -63,7 +63,7 @@ if __name__ == '__main__':
|
||||
test_file = './tests/files/contains_wps_network.cap'
|
||||
|
||||
target_bssid = 'A4:2B:8C:16:6B:3A'
|
||||
from Target import Target
|
||||
from ..model.target import Target
|
||||
fields = [
|
||||
'A4:2B:8C:16:6B:3A', # BSSID
|
||||
'2015-05-27 19:28:44', '2015-05-27 19:28:46', # Dates
|
||||
|
||||
Reference in New Issue
Block a user