All tools inherit "Dependency".
This commit is contained in:
@@ -57,7 +57,7 @@ class WEPAttackType(object):
|
|||||||
|
|
||||||
class Aireplay(Thread, Dependency):
|
class Aireplay(Thread, Dependency):
|
||||||
dependency_required = True
|
dependency_required = True
|
||||||
dependency_name = 'aircrack-ng'
|
dependency_name = 'aireplay-ng'
|
||||||
dependency_url = 'https://www.aircrack-ng.org/install.html'
|
dependency_url = 'https://www.aircrack-ng.org/install.html'
|
||||||
|
|
||||||
def __init__(self, target, attack_type, client_mac=None, replay_file=None):
|
def __init__(self, target, attack_type, client_mac=None, replay_file=None):
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
#!/usr/bin/python2.7
|
#!/usr/bin/python2.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from .dependency import Dependency
|
||||||
|
from .airodump import Airodump
|
||||||
from ..model.attack import Attack
|
from ..model.attack import Attack
|
||||||
from ..model.wps_result import CrackResultWPS
|
from ..model.wps_result import CrackResultWPS
|
||||||
from ..tools.airodump import Airodump
|
|
||||||
from ..util.color import Color
|
from ..util.color import Color
|
||||||
from ..util.timer import Timer
|
from ..util.timer import Timer
|
||||||
from ..util.process import Process
|
from ..util.process import Process
|
||||||
@@ -12,7 +13,11 @@ from ..config import Configuration
|
|||||||
import os, time, re
|
import os, time, re
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
||||||
class Bully(Attack):
|
class Bully(Attack, Dependency):
|
||||||
|
dependency_required = False
|
||||||
|
dependency_name = 'bully'
|
||||||
|
dependency_url = 'https://github.com/aanarchyy/bully'
|
||||||
|
|
||||||
def __init__(self, target):
|
def __init__(self, target):
|
||||||
super(Bully, self).__init__(target)
|
super(Bully, self).__init__(target)
|
||||||
self.total_timeouts = 0
|
self.total_timeouts = 0
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from ..util.process import Process
|
#!/usr/bin/python2.7
|
||||||
from ..util.color import Color
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
class Dependency(object):
|
class Dependency(object):
|
||||||
required_attr_names = ['dependency_name', 'dependency_url', 'dependency_required']
|
required_attr_names = ['dependency_name', 'dependency_url', 'dependency_required']
|
||||||
@@ -16,6 +16,9 @@ class Dependency(object):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fails_dependency_check(cls):
|
def fails_dependency_check(cls):
|
||||||
|
from ..util.color import Color
|
||||||
|
from ..util.process import Process
|
||||||
|
|
||||||
if Process.exists(cls.dependency_name):
|
if Process.exists(cls.dependency_name):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,12 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
class Ifconfig(object):
|
from .dependency import Dependency
|
||||||
|
|
||||||
|
class Ifconfig(Dependency):
|
||||||
|
dependency_required = True
|
||||||
|
dependency_name = 'ifconfig'
|
||||||
|
dependency_url = 'apt-get install net-tools'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def up(cls, interface, args=[]):
|
def up(cls, interface, args=[]):
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
#!/usr/bin/python2.7
|
#!/usr/bin/python2.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
class Iwconfig(object):
|
from .dependency import Dependency
|
||||||
|
|
||||||
|
class Iwconfig(Dependency):
|
||||||
|
dependency_required = True
|
||||||
|
dependency_name = 'iwconfig'
|
||||||
|
dependency_url = 'apt-get install wireless-tools'
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def exists(cls):
|
def exists(cls):
|
||||||
from ..util.process import Process
|
from ..util.process import Process
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
#!/usr/bin/python2.7
|
#!/usr/bin/python2.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from .dependency import Dependency
|
||||||
from ..tools.ifconfig import Ifconfig
|
from ..tools.ifconfig import Ifconfig
|
||||||
from ..util.color import Color
|
from ..util.color import Color
|
||||||
|
|
||||||
class Macchanger(object):
|
class Macchanger(Dependency):
|
||||||
|
dependency_required = False
|
||||||
|
dependency_name = 'macchanger'
|
||||||
|
dependency_url = 'apt-get install macchanger'
|
||||||
|
|
||||||
is_changed = False
|
is_changed = False
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
#!/usr/bin/python2.7
|
#!/usr/bin/python2.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from .dependency import Dependency
|
||||||
from ..util.process import Process
|
from ..util.process import Process
|
||||||
import re
|
import re
|
||||||
|
|
||||||
class Pyrit(object):
|
class Pyrit(Dependency):
|
||||||
''' Wrapper for Pyrit program. '''
|
''' Wrapper for Pyrit program. '''
|
||||||
|
dependency_required = False
|
||||||
|
dependency_name = 'pyrit'
|
||||||
|
dependency_url = 'https://github.com/JPaulMora/Pyrit/wiki'
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -1,18 +1,23 @@
|
|||||||
#!/usr/bin/python2.7
|
#!/usr/bin/python2.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from .dependency import Dependency
|
||||||
|
from .airodump import Airodump
|
||||||
|
from .bully import Bully # for PSK retrieval
|
||||||
from ..model.attack import Attack
|
from ..model.attack import Attack
|
||||||
from ..config import Configuration
|
from ..config import Configuration
|
||||||
from ..util.color import Color
|
from ..util.color import Color
|
||||||
from ..util.process import Process
|
from ..util.process import Process
|
||||||
from ..util.timer import Timer
|
from ..util.timer import Timer
|
||||||
from ..tools.airodump import Airodump
|
|
||||||
from ..tools.bully import Bully # for PSK retrieval
|
|
||||||
from ..model.wps_result import CrackResultWPS
|
from ..model.wps_result import CrackResultWPS
|
||||||
|
|
||||||
import os, time, re
|
import os, time, re
|
||||||
|
|
||||||
class Reaver(Attack):
|
class Reaver(Attack, Dependency):
|
||||||
|
dependency_required = False
|
||||||
|
dependency_name = 'reaver'
|
||||||
|
dependency_url = 'https://github.com/t6x/reaver-wps-fork-t6x'
|
||||||
|
|
||||||
def __init__(self, target):
|
def __init__(self, target):
|
||||||
super(Reaver, self).__init__(target)
|
super(Reaver, self).__init__(target)
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
#!/usr/bin/python2.7
|
#!/usr/bin/python2.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from .dependency import Dependency
|
||||||
from ..util.process import Process
|
from ..util.process import Process
|
||||||
import re
|
import re
|
||||||
|
|
||||||
class Tshark(object):
|
class Tshark(Dependency):
|
||||||
''' Wrapper for Tshark program. '''
|
''' Wrapper for Tshark program. '''
|
||||||
|
dependency_required = False
|
||||||
|
dependency_name = 'tshark'
|
||||||
|
dependency_url = 'apt-get install wireshark'
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
#!/usr/bin/python2.7
|
#!/usr/bin/python2.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from .dependency import Dependency
|
||||||
from ..util.process import Process
|
from ..util.process import Process
|
||||||
import json
|
import json
|
||||||
|
|
||||||
class Wash(object):
|
class Wash(Dependency):
|
||||||
''' Wrapper for Wash program. '''
|
''' Wrapper for Wash program. '''
|
||||||
|
dependency_required = False
|
||||||
|
dependency_name = 'wash'
|
||||||
|
dependency_url = 'https://github.com/t6x/reaver-wps-fork-t6x'
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ class Timer(object):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def secs_to_str(seconds):
|
def secs_to_str(seconds):
|
||||||
'''Human-readable seconds. 193 -> 3m13s'''
|
'''Human-readable seconds. 193 -> 3m13s'''
|
||||||
|
if seconds < 0:
|
||||||
|
return '-%ds' % seconds
|
||||||
|
|
||||||
rem = int(seconds)
|
rem = int(seconds)
|
||||||
hours = rem / 3600
|
hours = rem / 3600
|
||||||
mins = (rem % 3600) / 60
|
mins = (rem % 3600) / 60
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/python2.7
|
#!/usr/bin/python3.7
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -18,6 +18,18 @@ from .model.result import CrackResult
|
|||||||
from .model.handshake import Handshake
|
from .model.handshake import Handshake
|
||||||
from .tools.airmon import Airmon
|
from .tools.airmon import Airmon
|
||||||
from .tools.airodump import Airodump
|
from .tools.airodump import Airodump
|
||||||
|
from .tools.aircrack import Aircrack
|
||||||
|
from .tools.aireplay import Aireplay
|
||||||
|
from .tools.ifconfig import Ifconfig
|
||||||
|
from .tools.iwconfig import Iwconfig
|
||||||
|
from .tools.hostapd import Hostapd
|
||||||
|
from .tools.dnsmasq import Dnsmasq
|
||||||
|
from .tools.bully import Bully
|
||||||
|
from .tools.reaver import Reaver
|
||||||
|
from .tools.wash import Wash
|
||||||
|
from .tools.pyrit import Pyrit
|
||||||
|
from .tools.tshark import Tshark
|
||||||
|
from .tools.macchanger import Macchanger
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
@@ -52,7 +64,18 @@ class Wifite(object):
|
|||||||
def dependency_check(self):
|
def dependency_check(self):
|
||||||
''' Check that required programs are installed '''
|
''' Check that required programs are installed '''
|
||||||
|
|
||||||
apps = [Airmon, Airodump] #, Iwconfig, Ifconfig, Aircrack, Aireplay, Airodump]
|
apps = [
|
||||||
|
# Aircrack
|
||||||
|
Airmon, Airodump, Aircrack, Aireplay, Airodump,
|
||||||
|
# wireless/net tools
|
||||||
|
Iwconfig, Ifconfig,
|
||||||
|
# WPS
|
||||||
|
Reaver, Bully,
|
||||||
|
# Cracking/handshakes
|
||||||
|
Pyrit, Tshark,
|
||||||
|
# Misc
|
||||||
|
Macchanger
|
||||||
|
]
|
||||||
|
|
||||||
if Configuration.use_eviltwin:
|
if Configuration.use_eviltwin:
|
||||||
apps.extend([Hostapd, Dnsmasq, Iptables])
|
apps.extend([Hostapd, Dnsmasq, Iptables])
|
||||||
|
|||||||
Reference in New Issue
Block a user