A simple Python script to scan and display available WiFi networks using PowerShell. This script is designed to run on Windows or Windows Subsystem for Linux (WSL).
- Scans for available WiFi networks.
- Displays network details in a formatted table.
- Visualizes signal strength with a colored bar.
- Uses PowerShell commands for WiFi scanning.
Before running the script, ensure you have the following:
- Python 3.x: Download and install Python from python.org.
- PowerShell: Pre-installed on Windows systems.
- Git (optional): For cloning the repository.
-
Clone the Repository:
git clone https://github.com/maksha/scanwifi.git cd scanwifi
-
Setup and activate the Virtual Environment:
$ python -m .venv .venv // On WSL $ source .venv/bin/activate // On Windows PS> .venv\Scripts\activate
-
Install dependencies: The script requires the following Python packages:
- tabulate: For formatting the output table.
- colorama: For adding colored text to the output.
These dependencies are listed in the requirements.txt file and can be installed using:
bash $ pip install -r requirements.txt
-
Run the script:
$ python scanwifi.py
-
Sample Output:
scanwifi.py Network Scan Results ╒══════════════╤══════════════════════════╤══════════════════════════╤══════════════╕ │ SSID │ BSSID │ Signal │ Auth │ ╞══════════════╪══════════════════════════╪══════════════════════════╪══════════════╡ │ HomeWiFi │ 00:11:22:33:44:55 │ ||||||||||||||||---- 80% │ WPA2 │ ├──────────────┼──────────────────────────┼──────────────────────────┼──────────────┤ │ GuestWiFi │ 66:77:88:99:AA:BB │ ||||||||------------ 40% │ Open │ ╘══════════════╧══════════════════════════╧══════════════════════════╧══════════════╛
Thanks to the Python community for creating amazing tools like tabulate
and colorama
.