Skip to content

Commit

Permalink
Merge pull request #132 from s0lst1c3/abs-path-ctrl-iface
Browse files Browse the repository at this point in the history
Hostapd ctrl_interfac abspath fix
  • Loading branch information
s0lst1c3 authored Dec 20, 2019
2 parents 2accca4 + ae2fc9a commit fa78e40
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,6 @@ Added beacon forger for executing known SSID bursts

1.12.0 - Gabriel Ryan <gryan@specterops.io>
Added --known-ssids flag that can be used instead of --known-ssids-file flag.

1.12.1 - Gabriel Ryan <gabriel@specterops.io>
Hostapd ctrl_interface name randomly generated to support multiple concurrent eaphammer instances, given absolute path
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ by Gabriel Ryan ([s0lst1c3](https://twitter.com/s0lst1c3))(gabriel[at]specterops

[![Foo](https://rawcdn.githack.com/toolswatch/badges/8bd9be6dac2a1d445367001f2371176cc50a5707/arsenal/usa/2017.svg)](https://www.blackhat.com/us-17/arsenal.html#eaphammer)

Current release: [v1.12.0](https://github.com/s0lst1c3/eaphammer/releases/tag/v1.12.0)
Current release: [v1.12.1](https://github.com/s0lst1c3/eaphammer/releases/tag/v1.12.0)

Supports _Python 3.5+_.

Expand Down
4 changes: 2 additions & 2 deletions __version__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__version__ = '1.12.0'
__version__ = '1.12.1'
__codename__ = 'Power Overwhelming'
__author__ = '@s0lst1c3'
__contact__ = 'gryan@specterops.io'
__contact__ = 'gabriel@specterops.io'
__tagline__ = 'Rogue AP attacks for operators.'
3 changes: 2 additions & 1 deletion core/hostapd_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ def populate_general(self, settings, options):

general_configs['country_code'] = settings.dict['core']['hostapd']['general']['country_code']

general_configs['ctrl_interface'] = settings.dict['core']['hostapd']['general']['ctrl_interface']
#general_configs['ctrl_interface'] = settings.dict['core']['hostapd']['general']['ctrl_interface']
general_configs['ctrl_interface'] = settings.dict['paths']['hostapd']['ctrl_interface']

general_configs['ctrl_interface_group'] = settings.dict['core']['hostapd']['general']['ctrl_interface_group']

Expand Down
9 changes: 7 additions & 2 deletions settings/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

class OutputFile(object):

def __init__(self, name='', ext=''):
def __init__(self, name='', ext='', length=32):
datestring = datetime.strftime(datetime.now(), '%Y-%m-%d-%H-%M-%S')
randstring = ''.join(random.choice(string.ascii_letters+string.digits) for _ in range(32))
randstring = ''.join(random.choice(string.ascii_letters+string.digits) for _ in range(length))
self.str = ''
if name != '':
self.str += '%s-' % name
Expand All @@ -28,6 +28,7 @@ def __str__(self):
CONF_DIR = os.path.join(ROOT_DIR, 'settings')
SAVE_DIR = os.path.join(ROOT_DIR, 'saved-configs')
LOG_DIR = os.path.join(ROOT_DIR, 'logs')
RUN_DIR = os.path.join(ROOT_DIR, 'run')
SCRIPT_DIR = os.path.join(ROOT_DIR, 'scripts')
DB_DIR = os.path.join(ROOT_DIR, 'db')
TMP_DIR = os.path.join(ROOT_DIR, 'tmp')
Expand Down Expand Up @@ -81,6 +82,9 @@ def __str__(self):
HOSTAPD_BIN = os.path.join(HOSTAPD_DIR, 'hostapd-eaphammer')
HOSTAPD_LIB = os.path.join(HOSTAPD_DIR, 'libhostapd-eaphammer.so')
HOSTAPD_LOG = os.path.join(LOG_DIR, 'hostapd-eaphammer.log')
#output_file = 'hostapd-control-interface' # fuckit
output_file = OutputFile(name='ctrl-iface', length=8).string()
HOSTAPD_CTRL_INTERFACE = os.path.join(RUN_DIR, output_file)

# eap_spray paths
EAP_SPRAY_LOG = os.path.join(LOG_DIR, 'eap_spray.log')
Expand Down Expand Up @@ -191,6 +195,7 @@ def __str__(self):
'phase1_accounts' : PHASE1_ACCOUNTS,
'phase2_accounts' : PHASE2_ACCOUNTS,
'fifo' : FIFO_PATH,
'ctrl_interface' : HOSTAPD_CTRL_INTERFACE,
'conf' : HOSTAPD_CONF,
'save' : HOSTAPD_SAVE,
'mac_whitelist' : HOSTAPD_MAC_WHITELIST,
Expand Down

0 comments on commit fa78e40

Please sign in to comment.