WiFi Security & Router Diagnostics is a cross-platform Python script that retrieves saved WiFi profiles and their details including passwords, authentication type, encryption, and radio band on Windows, Linux, and macOS. It uses platform-native tools (netsh on Windows, NetworkManager on Linux, and Keychain on macOS) to access and display this information. The script includes an interactive menu for filtering, searching, and exporting results, as well as user consent via Terms and Conditions before any data is retrieved.
- Developer: Shabir Mahfudz Prahono - @shabir-mp
- Application creation date: 18 June 2024
- Last updated: 17 March 2026
- Cross-platform support: Windows, Linux, and macOS.
- Retrieves all saved WiFi profiles on the device.
- Displays WiFi name, password, authentication type, encryption cipher, and radio band.
- Colorized terminal output — green for profiles with a password, red for those without.
- Interactive menu with options to browse, search, filter, and export data.
- Search profiles by name keyword.
- Filter to show only profiles that have a saved password.
- Export results to CSV, TXT, or JSON (auto-timestamped filenames).
- Re-scan profiles without restarting the program.
- Auto-installs
coloramaif not already present.
- Python 3.x
colorama(auto-installed on first run)- Windows: No additional requirements
- Linux: NetworkManager (
/etc/NetworkManager/system-connections/) — requires root for password access - macOS:
networksetupandsecurityCLI tools (built-in)
- Clone this repository or download the script directly.
git clone https://github.com/shabir-mp/WiFi-Password-Cracker.git cd WiFi-Password-Cracker - Ensure you have Python 3.x installed. You can download it from python.org.
-
Open a terminal or command prompt.
-
Navigate to the directory where
main.pyis located. -
Run the script:
python main.py
Linux/macOS: If profiles are not found, run with elevated permissions:
sudo python main.py
-
Read and agree to the Terms and Conditions by typing
Y. -
Use the interactive menu to navigate:
Option Description [1]Show All ProfilesDisplay all scanned WiFi profiles [2]Search by NameFilter profiles by a keyword [3]Show Only With PasswordDisplay only profiles that have a saved password [4]Export ResultsSave current view to CSV, TXT, or JSON [5]Re-ScanRefresh the profile list from the system [0]ExitExit the program
def check_dependencies():
try:
import colorama
except ImportError:
subprocess.check_call([sys.executable, "-m", "pip", "install", "colorama"])Automatically installs colorama if it is not found, so no manual pip install is needed before running the script.
OS = platform.system() # "Windows", "Linux", "Darwin"Detects the current operating system and routes all profile retrieval functions accordingly.
Uses netsh wlan show profiles to list all profiles and netsh wlan show profile <name> key=clear to retrieve password, authentication, cipher, and radio band for each profile.
Reads .nmconnection files from /etc/NetworkManager/system-connections/. Extracts psk (password), key-mgmt (auth), pairwise (encryption), and band fields. Raises a [Permission Denied] note if root access is required.
Uses networksetup -listpreferredwirelessnetworks en0 to list profiles and security find-generic-password -wa <name> to retrieve passwords from the system Keychain.
def scan_all_profiles():Calls the appropriate platform-specific parser and returns a unified list of profile dictionaries with the keys: name, password, auth, encryption, band.
def print_table(profiles):Prints results as a formatted, colorized table. Rows are shown in green if a password is found, and red if no password is stored.
def filter_profiles(profiles, keyword=None, with_password_only=False):Filters the profile list by a case-insensitive name keyword and/or by password presence. Used by menu options [2] and [3].
def export_profiles(profiles, fmt):Exports the current profile view to a file. The filename is auto-generated with a timestamp, e.g. fisard_wifi_export_20260315_143022.csv. Supports three formats:
- CSV — spreadsheet-compatible, one row per profile
- TXT — human-readable, one block per profile
- JSON — structured data, array of profile objects
def show_menu():Displays a box-styled menu using Unicode border characters. Returns the user's choice as a string for the main loop to process.
This script is intended for educational and personal use only. Unauthorized access to networks or devices you do not own is illegal and unethical. Use this script responsibly and only on devices you own or have explicit permission to access.
This project is licensed under the MIT License. See the LICENSE file for more details.

