Parse file in linux to build a csv.
Budget: $10 – $30 AUD
Hi,
On my raspberry Pi, I am using the command iwlist wlan0 scan to output all SSID's in range. I need to parse the output into a CSV. I have attached a full scan output. A sample is below. Each line of the CSV needs to represent each SSID found. If the SSID is hidden then replace the "" with "HIDDEN"
You can assume I have run the command and captured into a file as per the attachment.
The CSV would be similar to this
CELL,CHANNEL,FREQUENCY,QUALITY,ENCRYPTION, SSID so on and so on.
Here is an example of the raw output from iwlist.
Cell 20 - Address: 58:B6:33:0D:B5:ED
Channel:36
Frequency:5.18 GHz (Channel 36)
Quality=53/70 Signal level=-57 dBm
Encryption key:on
ESSID:"Happy_Sweet_16"
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=0000000000000000
Extra: Last beacon: 100ms ago
IE: Unknown: 000E48617070795F53776565745F3136
IE: Unknown: 01088C129824B048606C
IE: Unknown: 030124
IE: Unknown: 070A55532024042495042400
IE: Unknown: DD180050F2020101890003A4000027A4000042435E0062322F00
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: 2D1AEF191FFFFFFFFF00000000000000000000000000000000000000
IE: Unknown: 3D1624050000000000000000000000000000000000000000
IE: Unknown: 0B050000040000
IE: Unknown: 7F080000080000000040
IE: Unknown: BF0CB2698B23AAFF0000AAFF0000
IE: Unknown: C005012A00FCFF
IE: Unknown: C30502B8B8B801
IE: Unknown: DD080013920100010522
thanks
On my raspberry Pi, I am using the command iwlist wlan0 scan to output all SSID's in range. I need to parse the output into a CSV. I have attached a full scan output. A sample is below. Each line of the CSV needs to represent each SSID found. If the SSID is hidden then replace the "" with "HIDDEN"
You can assume I have run the command and captured into a file as per the attachment.
The CSV would be similar to this
CELL,CHANNEL,FREQUENCY,QUALITY,ENCRYPTION, SSID so on and so on.
Here is an example of the raw output from iwlist.
Cell 20 - Address: 58:B6:33:0D:B5:ED
Channel:36
Frequency:5.18 GHz (Channel 36)
Quality=53/70 Signal level=-57 dBm
Encryption key:on
ESSID:"Happy_Sweet_16"
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=0000000000000000
Extra: Last beacon: 100ms ago
IE: Unknown: 000E48617070795F53776565745F3136
IE: Unknown: 01088C129824B048606C
IE: Unknown: 030124
IE: Unknown: 070A55532024042495042400
IE: Unknown: DD180050F2020101890003A4000027A4000042435E0062322F00
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: 2D1AEF191FFFFFFFFF00000000000000000000000000000000000000
IE: Unknown: 3D1624050000000000000000000000000000000000000000
IE: Unknown: 0B050000040000
IE: Unknown: 7F080000080000000040
IE: Unknown: BF0CB2698B23AAFF0000AAFF0000
IE: Unknown: C005012A00FCFF
IE: Unknown: C30502B8B8B801
IE: Unknown: DD080013920100010522
thanks