best bet is using awk,
for example will display all the BSSID's and client MAC addresses you captured in your dump.Code:cat test-01.txt | awk -F "," '{ print $1 }'
Code:BSSID 02:18:F8:F9:73:F6 02:18:F8:F9:73:F5 Station MAC 00:13:10:3D:82:0F
I'm trying to write a script that needs to read the BSSID's that airodump spits out. Is there a way I can do this? obviously a simple parse, grep doesn't work.
best bet is using awk,
for example will display all the BSSID's and client MAC addresses you captured in your dump.Code:cat test-01.txt | awk -F "," '{ print $1 }'
Code:BSSID 02:18:F8:F9:73:F6 02:18:F8:F9:73:F5 Station MAC 00:13:10:3D:82:0F
Python quickie :
Code:# let's say the Airodump's file is called "temp.cap-01.txt" : capFile= open( "temp.cap-01.txt", "r" ) # headers to get rid of: s1 = ( "BSSID, First time" ) s2 = ( "Station MAC, Firs" ) for line in capFile: # get rid of the headers: if not line.rfind(s1) != -1 and not line.rfind(s2) != -1: #print first 16 chars: print line[0:17] capFile.close()
Beer is served only to members of the trade union!
There is also a new tool in aircrack-ng svn written by my friend TheX1le called airgraph-ng which is a python parser for airodump. It gives a graphic image but I'm sure you could add a few lines to output the essids into a list.
You can get it here svn co http://trac.aircrack-ng.org/svn/branch/airgraph-ng airgraph-ng
and here is a screenshot of it
http://d.imagehost.org/view/0033/dakahuna-6_prn.gif