Results 1 to 1 of 1

Thread: Need some awk parsing help

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    43

    Default Need some awk parsing help

    I run a airodump and write it to file.. i then want to just grab everything from the

    Code:
    root@bt:~# cat output.out-01.csv 
    
    BSSID, First time seen, Last time seen, channel, Speed, Privacy, Cipher, Authentication, Power, # beacons, # IV, LAN IP, ID-length, ESSID, Key
    00:21:29:84:1F:6E, 2011-11-02 22:56:58, 2011-11-02 22:56:58,  6,  54, WPA , TKIP,PSK, -73,        2,        0,   0.  0.  0.  0,  14, LOU-PC_Network, 
    00:26:F2:A4:21:02, 2011-11-02 22:56:50, 2011-11-02 22:57:01,  1,  54, WPA2WPA , CCMP TKIP,PSK, -51,        8,        0,   0.  0.  0.  0,  17, woody-HP-Wireless, 
    02:1E:E5:56:7B:F4, 2011-11-02 22:56:51, 2011-11-02 22:57:00, 11,  54, OPN ,       ,   , -32,       14,        0,   0.  0.  0.  0,  15, dd-wrt_vap Free, 
    00:1E:E5:56:7B:F7, 2011-11-02 22:56:51, 2011-11-02 22:57:00, 11,  54, WEP , WEP,   , -32,       12,        0,   0.  0.  0.  0,   6, dd-wrt, 
    
    Station MAC, First time seen, Last time seen, Power, # packets, BSSID, Probed ESSIDs
    BC:77:37:B5:7D:A4, 2011-11-02 22:57:00, 2011-11-02 22:57:00, -20,        3, (not associated) , dd-wrt
    
    root@bt:~# kwrite output.out-01.csv

    Then i want to parse from the 3rd line till the first line break(where it starts looking at stations...

    so far i have this...

    Code:
    root@bt:~# awk -F',' 'NR>2{print "BSSID: " $1 "    Channel: " $4}' /root/output.out-01.csv 
    BSSID: 00:21:29:84:1F:6E    Channel:   6
    BSSID: 00:26:F2:A4:21:02    Channel:   1
    BSSID: 02:1E:E5:56:7B:F4    Channel:  11
    BSSID: 00:1E:E5:56:7B:F7    Channel:  11
        Channel: 
    BSSID: Station MAC    Channel:  Power
    BSSID: BC:77:37:B5:7D:A4    Channel:  -20
        Channel:

    Basically i want it to stop when it sees that first blank line.. as that is the divide for the "workstations"

    Any suggestions?

    Edit:

    Ok i kinda made something silple difficult.... at the end of the day i wanted just the WEP AP's to show up.. so this did the trick

    Code:
    awk -F',' '/WEP/''{print "BSSID: " $1 " Channel: " $4 " Auth: " $6 " ESSID: " $14}' /root/output.out-01.csv

    ok but the next thing is how do i put each one into an array... and then ask the user to choose.... 1, 2 or 3?


    off to google!
    Last edited by sickness; 11-06-2011 at 08:11 AM.

Similar Threads

  1. Parsing SSLStrip with definitions.sslstrip in easy-cred
    By ericmilam in forum BackTrack 5 Experts Section
    Replies: 3
    Last Post: 06-28-2011, 09:40 PM
  2. Parsing SSLStrip with definitions.sslstrip in easy-cred
    By ericmilam in forum BackTrack 5 Beginners Section
    Replies: 0
    Last Post: 05-31-2011, 08:39 PM
  3. Kismet file parsing.
    By -`Joseph`- in forum OLD Newbie Area
    Replies: 15
    Last Post: 08-01-2007, 11:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •