{"id":34032486,"url":"https://github.com/needs-coffee/wifipasswords","last_synced_at":"2026-04-08T19:33:33.087Z","repository":{"id":39291202,"uuid":"350812398","full_name":"needs-coffee/wifipasswords","owner":"needs-coffee","description":"Retreive and save all WiFi networks and passwords on the device.  Cross platform windows, linux, macOS","archived":false,"fork":false,"pushed_at":"2022-06-24T05:11:16.000Z","size":162,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-02T18:18:24.217Z","etag":null,"topics":["linux","macos","passwords","python","python3","tools","wifi","wifi-network","wifi-networks","windows","wpa-supplicant"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/needs-coffee.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.txt","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-23T18:13:01.000Z","updated_at":"2025-05-31T09:46:40.000Z","dependencies_parsed_at":"2022-09-01T13:21:09.690Z","dependency_job_id":null,"html_url":"https://github.com/needs-coffee/wifipasswords","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/needs-coffee/wifipasswords","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needs-coffee%2Fwifipasswords","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needs-coffee%2Fwifipasswords/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needs-coffee%2Fwifipasswords/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needs-coffee%2Fwifipasswords/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/needs-coffee","download_url":"https://codeload.github.com/needs-coffee/wifipasswords/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/needs-coffee%2Fwifipasswords/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31571601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","macos","passwords","python","python3","tools","wifi","wifi-network","wifi-networks","windows","wpa-supplicant"],"created_at":"2025-12-13T18:49:39.975Z","updated_at":"2026-04-08T19:33:33.078Z","avatar_url":"https://github.com/needs-coffee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wifipasswords\r\n\r\n![PyPI](https://img.shields.io/pypi/v/wifipasswords) ![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/needs-coffee/wifipasswords?include_prereleases) ![GitHub](https://img.shields.io/github/license/needs-coffee/wifipasswords) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/wifipasswords) [![Downloads](https://pepy.tech/badge/wifipasswords)](https://pepy.tech/project/wifipasswords)\r\n\r\nRetrieve and save all WiFi networks and passwords on the device.  \r\nOn windows uses the netsh subprocess.  \r\nOn linux reads the NetworkManager files or wpa_supplicant.conf.  \r\n\r\nCross platform:\r\n- Windows\r\n- Linux\r\n- macOS (working - however see below note)\r\n\r\nthere is also a GUI version of this tool that can be found here - [WifiPasswords-GUI](https://github.com/needs-coffee/wifipasswords-GUI)\r\n\r\n**NOTE:** requires sudo privileges on linux only if NetworkManager is not used.  \r\n\r\n**NOTE:** Macos requires admin authentication for each password read, this can result in a lot of prompts for the get_passwords() function. I am currently looking for a solution for this.\r\n\r\nFeatures\r\n--------\r\n- Importable as a package or able to be run directly on the command line\r\n- Tested in Python 3.6 - 3.10\r\n- Tested on Windows 10, Ubuntu 18 - 20.04, Debian Buster, macOS 10.13 (High Sierra) and macOS 10.14 (Mojave)\r\n- Returns WiFi passwords as a dictionary\r\n- Able to show visible wifi networks\r\n- Able to show currently connected SSID\r\n- Able to show current DNS config\r\n- Able to show known SSIDs and find single network passwords\r\n- Can save networks as JSON or wpa_supplicant.conf file\r\n\r\nInstallation\r\n------------\r\nInstalled via pip using: ``pip install wifipasswords``\r\n\r\nUsage\r\n-----\r\n```python\r\nfrom wifipasswords import WifiPasswords\r\n\r\npasswords = WifiPasswords().get_passwords()\r\nconnected_passwords = WifiPasswords().get_currently_connected_passwords()\r\n\r\nprint(passwords)\r\nprint(connected_passwords)\r\n\r\nWifiPasswords().save_wpa_supplicant('.', passwords, True, 'GB')\r\n```\r\n\r\nCommand Line Usage\r\n------------------\r\nProvides a command line interface callable after installation with:\r\n- ``python3 -m wifipasswords``\r\n- ``wifipasswords``\r\n\r\n```shell\r\n    ~ $ wifipasswords\r\n```\r\n\r\n![example output](docs/command_line_example.png \"Example Command Line Output\")\r\n\r\n\r\nTo see command line options run ``wifipasswords -h``\r\n\r\nPackaging as EXE\r\n----------------\r\nCan be packaged to an EXE on windows with:  \r\n``pyinstaller --clean --noconsole --onefile -i \u003cicon\u003e wifipasswords_exe.py``\r\n\r\nThe wifipasswords_exe.py file is the same as the __main__.py file in the package except will pause after console output is finished to prevent the terminal from auto-closing if the EXE is run directly.\r\n\r\n\r\nTesting\r\n-------\r\nTest locally with `pytest -v ./tests`\r\nCurrently github test runners do not have nmcli interface to access wifi data so test locally. \r\n\r\nAbout\r\n-----\r\nCreation date: 10-02-2019  \r\nDependencies: colorama  \r\n\r\n\r\nLicence\r\n-------\r\nCopyright (C) 2019-2022 Joe Campbell  \r\n GNU GENERAL PUBLIC LICENSE (GPLv3)  \r\n\r\nThis program is free software: you can redistribute it and / or modify\r\nit under the terms of the GNU General Public License as published by\r\nthe Free Software Foundation, either version 3 of the License, or\r\n(at your option) any later version.\r\n\r\nThis program is distributed in the hope that it will be useful,\r\nbut WITHOUT ANY WARRANTY\r\nwithout even the implied warranty of\r\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\nGNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License\r\nalong with this program.  If not, see \u003c https: // www.gnu.org/licenses/\u003e.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneeds-coffee%2Fwifipasswords","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneeds-coffee%2Fwifipasswords","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneeds-coffee%2Fwifipasswords/lists"}