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:
@@ -151,7 +151,8 @@ class Airodump(object):
|
|||||||
targets = []
|
targets = []
|
||||||
import csv
|
import csv
|
||||||
with open(csv_filename, 'rb') as csvopen:
|
with open(csv_filename, 'rb') as csvopen:
|
||||||
csv_reader = csv.reader(csvopen, delimiter=',')
|
lines = (line.replace('\0', '') for line in csvopen)
|
||||||
|
csv_reader = csv.reader(lines, delimiter=',')
|
||||||
hit_clients = False
|
hit_clients = False
|
||||||
for row in csv_reader:
|
for row in csv_reader:
|
||||||
# Each "row" is a list of fields for a target/client
|
# Each "row" is a list of fields for a target/client
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ class AttackWPS(Attack):
|
|||||||
'-b', self.target.bssid,
|
'-b', self.target.bssid,
|
||||||
'-c', self.target.channel,
|
'-c', self.target.channel,
|
||||||
'-a', # Automatically restart session
|
'-a', # Automatically restart session
|
||||||
'-v' # verbose
|
'-vv' # verbose
|
||||||
]
|
]
|
||||||
reaver = Process(command, stdout=stdout_write, stderr=Process.devnull())
|
reaver = Process(command, stdout=stdout_write, stderr=Process.devnull())
|
||||||
|
|
||||||
@@ -241,11 +241,19 @@ class AttackWPS(Attack):
|
|||||||
pin_current = len(pins)
|
pin_current = len(pins)
|
||||||
|
|
||||||
# Failures
|
# 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
|
# Status
|
||||||
if 'Waiting for beacon from' in out: state = '{O}waiting for beacon{W}'
|
if 'Waiting for beacon from' in out: state = '{O}waiting for beacon{W}'
|
||||||
if 'Starting Cracking Session' in out: state = '{C}cracking{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:
|
if 'Detected AP rate limiting' in out:
|
||||||
state = '{R}rate-limited{W}'
|
state = '{R}rate-limited{W}'
|
||||||
if not Configuration.wps_skip_rate_limit:
|
if not Configuration.wps_skip_rate_limit:
|
||||||
@@ -253,6 +261,11 @@ class AttackWPS(Attack):
|
|||||||
Color.pl('{!} {R}hit rate limit, stopping{W}\n')
|
Color.pl('{!} {R}hit rate limit, stopping{W}\n')
|
||||||
break
|
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)
|
match = re.search('Estimated Remaining time: ([a-zA-Z0-9]+)', out)
|
||||||
if match:
|
if match:
|
||||||
eta = match.groups()[0]
|
eta = match.groups()[0]
|
||||||
@@ -287,6 +300,11 @@ class AttackWPS(Attack):
|
|||||||
[+] WPS PIN: '12345678'
|
[+] WPS PIN: '12345678'
|
||||||
[+] WPA PSK: 'abcdefgh'
|
[+] WPA PSK: 'abcdefgh'
|
||||||
[+] AP SSID: 'Test Router'
|
[+] 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()
|
reaver.interrupt()
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class Target(object):
|
|||||||
self.essid_known = True
|
self.essid_known = True
|
||||||
self.essid_len = int(fields[12].strip())
|
self.essid_len = int(fields[12].strip())
|
||||||
self.essid = fields[13].strip()
|
self.essid = fields[13].strip()
|
||||||
if self.essid == '\\x00' * self.essid_len:
|
if self.essid == '\\x00' * self.essid_len or self.essid.strip() == '':
|
||||||
# Don't display "\x00..." for hidden ESSIDs
|
# Don't display "\x00..." for hidden ESSIDs
|
||||||
self.essid = '(%s)' % self.bssid
|
self.essid = '(%s)' % self.bssid
|
||||||
self.essid_known = False
|
self.essid_known = False
|
||||||
|
|||||||
Reference in New Issue
Block a user