Wifi AP scanner tool
Project description
ap_scanner
Command Line Access Point (AP) scanning tool
Overview:
This python utility will scan for network Access Points (APs) using underlying OS utilities and list related AP information.
- Supports Linux and Windows.
- Output options include: formatted (default), csv and json
Install:
pip install ap_scanner
or for source code:
git clone https://github.com/JavaWiz1/ap_scanner.git
Note: poetry is used for dependency management and packaging
Usage:
usage: ap_scanner [-h] [-i <iface>] [-r] [-j] [-c] [-v] [--nmcli] [--iwlist] [--iw] [--netsh]
Scan for wi-fi access points (Networks)
options:
-h, --help show this help message and exit
-i <iface>, --interface <iface>
(Linux only) Interface to use, default=wlan0
-r, --rescan (Windows only) force network rescan for APs
-j, --json Output json result
-c, --csv Output csv result
-v, --verbose Debug/verbose output to console
--nmcli Force Linux Network Manager discovery
--iwlist Force Linux iwlist discovery
--iw Force Linux iw discover
--netsh Force Windows netsh discovery
This utility will scan for network APs (Access Points) using underlying OS utilities
and list related information.
- Supports Linux and Windows.
- Output options include: formatted (default), csv and json
Examples:
Windows - trigger re-scan to get most current list of access points
> ap_scanner -r
===========================================================
== ap_scanner v0.1.1 ==
===========================================================
== Scan for wi-fi access points (Networks) ==
===========================================================
Validate command line options
- 1 Wifi adapter(s) detected: Wi-Fi
- "Wi-Fi" will be used to scan via 802.11ac [99%]
- Windows Scanner netsh selected
Rescan requested
- Autoconnect enabled for MyLAN1
- Disconnect to trigger re-scan of network
Scan for access points (WindowsWiFiScanner)
- Executing: netsh wlan show network mode=bssid
Process results of scan
- 5 APs discovered
SSID Auth Encryption Mac Address Signal Radio Band Channel
------------------------- --------------- ---------- ----------------- ------ -------- ------- -------
MyLAN1 WPA2-Personal CCMP 0c:9a:91:2c:bb:28 99% 802.11n Unknown 3
0c:9a:91:2c:bb:2c 99% 802.11ac Unknown 36
NETGEAR99 WPA2-Personal CCMP b0:41:a0:85:0f:d6 99% 802.11n Unknown 3
**hidden** WPA2-Enterprise CCMP dc:eb:62:0a:b0:8b 33% 802.11n Unknown 1
42:f1:9a:6d:5c:7b 21% 802.11n Unknown 1
22:47:5c:fa:01:39 18% 802.11ac Unknown 6
Nirvana Open None f4:cf:b2:ac:bd:b1 58% 802.11n Unknown 1
ThePond WPA2-Personal CCMP 7c:80:26:01:70:de 51% 802.11n Unknown 1
Linux - Use wlan2 connection for scan and use Network Manager (nmcli) for discovery
> ap_scanner -i wlan2 --nmcli
===========================================================
== ap_scanner v0.1.1 ==
===========================================================
== Scan for wi-fi access points (Networks) ==
===========================================================
Validate command line options
- 1 Wifi adapter(s) detected: wlan2
- "wlan2" will be used to scan
Scan for access points (NetworkManagerWiFiScanner)
- Executing: /usr/bin/nmcli -t -f ssid,bssid,chan,freq,signal,security,rsn-flags device wifi list
Process results of scan
- 5 APs discovered
SSID Auth Encryption Mac Address Signal Radio Band Channel
------------------------- --------------- ---------- ----------------- ------ -------- ------- -------
MyLAN1 WPA2-Personal CCMP 0C-9A-91-2C-BB-28 100% Unknown 2.4 MHz 3
NETGEAR99 WPA2-Personal CCMP B0-41-A0-85-0F-D6 100% Unknown 2.4 MHz 3
**hidden** WPA2-Personal CCMP 88-9E-62-1D-3E-1A 100% Unknown 2.4 MHz 11
Nirvana Open None F4-CF-B2-AC-BD-B1 44% Unknown 2.4 MHz 1
ThePond WPA2-Personal CCMP 7C-80-26-01-70-DE 44% Unknown 2.4 MHz 1
Notes:
- On windows, you can rescan (-r) and search for current networks
- You may save the outut of the underlying command into a file (-s)
- You can force which method searches for networks:
- Linux: nmcli, iw, iwlist
- Windows: netsh
- Tested on
- Windows 10/11
- Ubuntu Ubuntu 22.04.3 LTS
- RaspPi OS - Debian GNU/Linux 11 (bullseye) / Raspbian GNU/Linux 10 (buster)
ToDo:
- Identify Band (i.e 2.4 MHz / 5 Mhz) on Windows
- Radio identification for Linux (802.11xx)
- Add Apple MAC capability
- Create unit tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ap_scanner-0.1.2.tar.gz
(13.5 kB
view details)
Built Distribution
File details
Details for the file ap_scanner-0.1.2.tar.gz
.
File metadata
- Download URL: ap_scanner-0.1.2.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6f403203ba881276eed128fdfac8f28ccdcfbf9c8c39393e2bb95b519f6e71c |
|
MD5 | 849b1a9d5b449fd66d269a6c41ea5e0c |
|
BLAKE2b-256 | 6c6a1a2e87ea8ef308182058aece7b70769e2662089424808f6fc4b120cbf25a |
File details
Details for the file ap_scanner-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: ap_scanner-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 241e07089699b0dd1ee8dbb2161c6c529cb0bcf4938a261242341af182a2283d |
|
MD5 | d5fbf4882eae6ec8acb91478c636762c |
|
BLAKE2b-256 | 97d518f90f8e5ed999963fb018d3b1f9c86e89ef240f1daddde5b6df4bc13ee0 |