2.1.2: Quiet decloak. Support ESSIDs with commas and trailing spaces
Decloaked ESSIDs will have a "*" next to their name. For #78 While testing, I found that Wifite did not parse Airodump's CSV correctly. Specifically, ESSIDs with commas or trailing spaces. Fixed in this commit. Also fixed hidden ESSID detection introduced by the new CSV parsing logic.
This commit is contained in:
13
tests/files/airodump-weird-ssids.csv
Normal file
13
tests/files/airodump-weird-ssids.csv
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
BSSID, First time seen, Last time seen, channel, Speed, Privacy, Cipher, Authentication, Power, # beacons, # IV, LAN IP, ID-length, ESSID, Key
|
||||
AA:BB:CC:DD:EE:FF, 2018-04-06 18:21:23, 2018-04-06 18:21:24, 10, 54, WPA2, CCMP,PSK, -34, 5, 0, 0. 0. 0. 0, 24, Comma\, no trailing space,
|
||||
AA:BB:CC:DD:EE:FF, 2018-04-06 18:19:17, 2018-04-06 18:19:19, 10, 54, WPA2, CCMP,PSK, -35, 18, 0, 0. 0. 0. 0, 20, \"Quoted ESSID\, Comma\, no trailing spaces. \",
|
||||
AA:BB:CC:DD:EE:FF, 2018-04-06 18:35:29, 2018-04-06 18:35:30, 10, 54, WPA2, CCMP,PSK, -31, 12, 0, 0. 0. 0. 0, 22, "Comma\, Trailing space ",
|
||||
AA:BB:CC:DD:EE:FF, 2018-04-06 18:22:45, 2018-04-06 18:22:46, 10, 54, WPA2, CCMP,PSK, -29, 15, 0, 0. 0. 0. 0, 30, "\"quote\" comma\, trailing space ",
|
||||
AA:BB:CC:DD:EE:FF, 2018-04-06 18:50:11, 2018-04-06 18:50:17, 10, 54, WPA2, CCMP,PSK, -20, 43, 0, 0. 0. 0. 0, 19, \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00,
|
||||
|
||||
|
||||
|
||||
|
||||
Station MAC, First time seen, Last time seen, Power, # packets, BSSID, Probed ESSIDs
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 135.
|
52
tests/test_Airodump.py
Normal file
52
tests/test_Airodump.py
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/python2.7
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
sys.path.insert(0, '..')
|
||||
|
||||
from wifite.tools.airodump import Airodump
|
||||
|
||||
import unittest
|
||||
|
||||
class TestAirodump(unittest.TestCase):
|
||||
''' Test suite for Wifite's interaction with the Airodump tool '''
|
||||
|
||||
|
||||
def test_airodump_weird_characters(self):
|
||||
csv_filename = self.getFile('airodump-weird-ssids.csv')
|
||||
targets = Airodump.get_targets_from_csv(csv_filename)
|
||||
|
||||
target = targets[0]
|
||||
expected = 'Comma, no trailing space'
|
||||
assert target.essid == expected, 'Expected ESSID (%s) but got (%s)' % (expected, target.essid)
|
||||
|
||||
target = targets[1]
|
||||
expected = '"Quoted ESSID, Comma, no trailing spaces. "'
|
||||
assert target.essid == expected, 'Expected ESSID (%s) but got (%s)' % (expected, target.essid)
|
||||
|
||||
target = targets[2]
|
||||
expected = 'Comma, Trailing space '
|
||||
assert target.essid == expected, 'Expected ESSID (%s) but got (%s)' % (expected, target.essid)
|
||||
|
||||
target = targets[3]
|
||||
expected = '"quote" comma, trailing space '
|
||||
assert target.essid == expected, 'Expected ESSID (%s) but got (%s)' % (expected, target.essid)
|
||||
|
||||
# Hidden access point
|
||||
target = targets[4]
|
||||
assert target.essid_known == False, 'ESSID full of null characters should not be known'
|
||||
expected = None
|
||||
assert target.essid == expected, 'Expected ESSID (%s) but got (%s)' % (expected, target.essid)
|
||||
assert target.essid_len == 19, 'ESSID length shold be 19, but got %s' % target.essid_len
|
||||
|
||||
|
||||
def getFile(self, filename):
|
||||
''' Helper method to parse targets from filename '''
|
||||
import os, inspect
|
||||
this_file = os.path.abspath(inspect.getsourcefile(self.getFile))
|
||||
this_dir = os.path.dirname(this_file)
|
||||
return os.path.join(this_dir, 'files', filename)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user