Skip to main content

A python parser for iwlist output

Project description

iw_parse

Parse the output of iwlist scan to get the name, address, quality, channel, and encryption type of all networks broadcasting within your Wireless NIC's reach.

Dependencies

  • pip - If you don't have pip installed, followed the link.

Installation

pip install iw_parse

Usage

iwlist <INTERFACE_NAME> scan | iw_parse

Replace <INTERFACE_NAME> with the system name for your wireless NIC. It is usually something like wlan0. The command iwconfig will list all of your network interfaces.

Example:

iwlist wlan0 scan | iw_parse

The result should look something like:

Name             Address             Quality   Channel   Encryption
wireless1        20:AA:4B:34:2C:F5   100 %     11        WEP
wireless2        00:26:F2:1E:FC:03    84 %     1         WPA v.1
wireless3        00:1D:D3:6A:3C:60    66 %     6         WEP
wireless4        20:10:7A:E5:02:98    64 %     1         WEP
wireless5        CC:A4:62:B7:D2:B0    54 %     8         WPA v.1
wireless6        30:46:9A:53:3C:76    47 %     11        WPA v.1
wireless7        A0:21:B7:5F:84:B0    44 %     11        WEP
wireless8        04:A1:51:18:E8:E0    41 %     6         WPA v.1

Example from Python shell:

>>> import iw_parse
>>> networks = iw_parse.get_interfaces(interface='wlan0')
>>> print networks
[{'Address': 'F8:1E:DF:F9:B0:0B',
  'Channel': '3',
  'Encryption': 'WEP',
  'Name': 'Francis',
  'Bit Rates': '144 Mb/s',
  'Signal Level': '42',
  'Name': 'Francis',
  'Quality': '100'},
 {'Address': '86:1B:5E:33:17:D4',
  'Channel': '6',
  'Encryption': 'Open',
  'Bit Rates': '54 Mb/s',
  'Signal Level': '72',
  'Name': 'optimumwifi',
  'Quality': '100'},
    ...

Acknowledgements

  • The vast majority of iw_parse was written by Hugo Chargois.

License

iw_parse is free--as in BSD. Hack your heart out, hackers.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iw_parse-0.0.3.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file iw_parse-0.0.3.tar.gz.

File metadata

  • Download URL: iw_parse-0.0.3.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.29.0 CPython/2.7.15

File hashes

Hashes for iw_parse-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d35d015fcd4f215d6b6e1da801e5a9c6e5a8cb5e619d8348625f4acfa22271dd
MD5 b16c5540fbf3d1e8be1a114a905baf49
BLAKE2b-256 39d9333f889e63be510ec7ab00c9253cd487ccdc18bf5d26055c372e55688d86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page