Backwards compatibility attempt #1

Got a fresh copy of Kali 1.1.0, didn't upgrade aircrack or reaver.

Supports:
* Aircrack-ng 1.2 rc1
* Reaver 1.4
This commit is contained in:
derv82
2015-06-10 00:59:04 -07:00
parent 27e786803a
commit 633d11b7d1
3 changed files with 23 additions and 4 deletions

View File

@@ -176,7 +176,7 @@ class AttackWPS(Attack):
'-b', self.target.bssid,
'-c', self.target.channel,
'-a', # Automatically restart session
'-v' # verbose
'-vv' # verbose
]
reaver = Process(command, stdout=stdout_write, stderr=Process.devnull())
@@ -241,11 +241,19 @@ class AttackWPS(Attack):
pin_current = len(pins)
# Failures
failures += out.count('WPS transaction failed')
if 'WPS transaction failed' in out:
failures += out.count('WPS transaction failed')
elif 'Receive timeout occurred' in out:
# Reaver 1.4
failures += out.count('Receive timeout occurred')
# Status
if 'Waiting for beacon from' in out: state = '{O}waiting for beacon{W}'
if 'Starting Cracking Session' in out: state = '{C}cracking{W}'
# Reaver 1.4
if 'Trying pin' in out: state = '{C}cracking{W}'
if 'Detected AP rate limiting' in out:
state = '{R}rate-limited{W}'
if not Configuration.wps_skip_rate_limit:
@@ -253,6 +261,11 @@ class AttackWPS(Attack):
Color.pl('{!} {R}hit rate limit, stopping{W}\n')
break
if 'WARNING: Failed to associate with' in out:
# TODO: Fail after X association failures (instead of just one)
Color.pl('\n{!} {R}failed to associate with target, {O}stopping{W}')
break
match = re.search('Estimated Remaining time: ([a-zA-Z0-9]+)', out)
if match:
eta = match.groups()[0]
@@ -287,6 +300,11 @@ class AttackWPS(Attack):
[+] WPS PIN: '12345678'
[+] WPA PSK: 'abcdefgh'
[+] AP SSID: 'Test Router'
Reaver 1.4:
[+] Max time remaining at this rate: 18:19:36 (10996 pins left to try)
[!] WARNING: Receive timeout occurred
'''
reaver.interrupt()