tags:

views:

50

answers:

1

I have to write a tool to get the encryption type out of a iwlist scan. I just can't seem to find whether or not there's a standard output. Googling it looks like people are posting slightly different formats, but I can't tell if they just copy/pasted wrong or what. Specifically, in Encryption key: On, is On/Off frist letter always capitalized? How about IE: IEEE 802.11i/WPA2 Version 1? Is the encryption always preceeded by IEEE 802.11i/?

I hope this is OK to ask here.

A: 

You may be better off parsing the contents of /proc/net/wireless, depending on what you need. This will help get you started. The fields are all the same, but the values can differ from driver to driver and device to device. So no, you probably can't rely on spelling to be consistent, and capitalization even less so.

Nathon