Sets up default initial configuration values. Also sets config values based on command-line arguments.
(cls, load_interface=True)
| 17 | |
| 18 | @classmethod |
| 19 | def initialize(cls, load_interface=True): |
| 20 | ''' |
| 21 | Sets up default initial configuration values. |
| 22 | Also sets config values based on command-line arguments. |
| 23 | ''' |
| 24 | # TODO: categorize configuration into separate classes (under config/*.py) |
| 25 | # E.g. Configuration.wps.enabled, Configuration.wps.timeout, etc |
| 26 | |
| 27 | # Only initialize this class once |
| 28 | if cls.initialized: |
| 29 | return |
| 30 | cls.initialized = True |
| 31 | |
| 32 | cls.verbose = 0 # Verbosity of output. Higher number means more debug info about running processes. |
| 33 | cls.print_stack_traces = True |
| 34 | |
| 35 | cls.kill_conflicting_processes = False |
| 36 | |
| 37 | cls.scan_time = 0 # Time to wait before attacking all targets |
| 38 | |
| 39 | cls.tx_power = 0 # Wifi transmit power (0 is default) |
| 40 | cls.interface = None |
| 41 | cls.target_channel = None # User-defined channel to scan |
| 42 | cls.target_essid = None # User-defined AP name |
| 43 | cls.target_bssid = None # User-defined AP BSSID |
| 44 | cls.ignore_essid = None # ESSIDs to ignore |
| 45 | cls.clients_only = False # Only show targets that have associated clients |
| 46 | cls.five_ghz = False # Scan 5Ghz channels |
| 47 | cls.show_bssids = False # Show BSSIDs in targets list |
| 48 | cls.random_mac = False # Should generate a random Mac address at startup. |
| 49 | cls.no_deauth = False # Deauth hidden networks & WPA handshake targets |
| 50 | cls.num_deauths = 1 # Number of deauth packets to send to each target. |
| 51 | |
| 52 | cls.encryption_filter = ['WEP', 'WPA', 'WPS'] |
| 53 | |
| 54 | # EvilTwin variables |
| 55 | cls.use_eviltwin = False |
| 56 | cls.eviltwin_port = 80 |
| 57 | cls.eviltwin_deauth_iface = None |
| 58 | cls.eviltwin_fakeap_iface = None |
| 59 | |
| 60 | # WEP variables |
| 61 | cls.wep_filter = False # Only attack WEP networks |
| 62 | cls.wep_pps = 600 # Packets per second |
| 63 | cls.wep_timeout = 600 # Seconds to wait before failing |
| 64 | cls.wep_crack_at_ivs = 10000 # Minimum IVs to start cracking |
| 65 | cls.require_fakeauth = False |
| 66 | cls.wep_restart_stale_ivs = 11 # Seconds to wait before restarting |
| 67 | # Aireplay if IVs don't increaes. |
| 68 | # '0' means never restart. |
| 69 | cls.wep_restart_aircrack = 30 # Seconds to give aircrack to crack |
| 70 | # before restarting the process. |
| 71 | cls.wep_crack_at_ivs = 10000 # Number of IVS to start cracking |
| 72 | cls.wep_keep_ivs = False # Retain .ivs files across multiple attacks. |
| 73 | |
| 74 | # WPA variables |
| 75 | cls.wpa_filter = False # Only attack WPA networks |
| 76 | cls.wpa_deauth_timeout = 15 # Wait time between deauths |
no test coverage detected