{"id":24549354,"url":"https://github.com/codernayeem/auto-guest-change","last_synced_at":"2026-04-18T04:02:51.575Z","repository":{"id":271912989,"uuid":"914871684","full_name":"codernayeem/auto-guest-change","owner":"codernayeem","description":"A automatic guest password change \u0026 display system for TP-Link EC220-G5 router","archived":false,"fork":false,"pushed_at":"2025-01-10T18:03:50.000Z","size":202,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T12:34:43.973Z","etag":null,"topics":["automation","flask","password-generator","python","router","selenium","tailwind","tp-link","tp-link-ec220-g5","wifi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codernayeem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-10T13:34:02.000Z","updated_at":"2025-01-10T18:03:54.000Z","dependencies_parsed_at":"2025-01-10T18:27:00.963Z","dependency_job_id":"09d04425-2aea-4216-b133-d5fa57707200","html_url":"https://github.com/codernayeem/auto-guest-change","commit_stats":null,"previous_names":["codernayeem/auto-guest-change"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codernayeem/auto-guest-change","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codernayeem%2Fauto-guest-change","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codernayeem%2Fauto-guest-change/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codernayeem%2Fauto-guest-change/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codernayeem%2Fauto-guest-change/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codernayeem","download_url":"https://codeload.github.com/codernayeem/auto-guest-change/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codernayeem%2Fauto-guest-change/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31955920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["automation","flask","password-generator","python","router","selenium","tailwind","tp-link","tp-link-ec220-g5","wifi"],"created_at":"2025-01-23T00:15:14.094Z","updated_at":"2026-04-18T04:02:47.193Z","avatar_url":"https://github.com/codernayeem.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# auto-guest-change\nA automatic **guest password** changer \u0026amp; updater for **TP-Link EC220-G5** Router.\n\nThis project automates the process of changing the guest network password of a router using Selenium and Python. It also includes a Flask server to store and retrieve the new password.\n\n\n## Features\n\n1. **Automated Password Update**:\n   - Generates a secure passkey using SHA-256 hashing.\n   - Adjustable passkey length and character set.\n   - Alternate character styles for simplicity.\n   - Logs into the router's admin panel and updates the guest network password.\n   - Uses Selenium's headless mode for smooth automation without GUI.\n   - use `single_run.py` for using only one time.\n   - use `multi_run.py` for running the script again \u0026 again after an **interval**.\n\n3. **Flask Server for Password Management**:\n   - Saves the new passkey in the server.\n   - Provides endpoints to retrieve and update the passkey.\n   - Homepage with autorefresh to show the latest password.\n   - You can host it anywhere.\n\n\n## Installation\n\n### Prerequisites\n\n- Python 3.8 or higher\n- Google Chrome and ChromeDriver\n- Flask (`pip install flask`)\n- Selenium (`pip install selenium`)\n- Requests library (`pip install requests`)\n\n---\n\n## Configuration\n\n### Script Configuration\n\nEdit the following variables in the script to match your router and server settings in `single_run.py`:\n\n```python\nrouter_login_page = 'http://192.168.0.1'  # Router login page URL\nrouter_password = 'YourRouterPassword'    # Router admin password\nserver_url = 'http://localhost:5000/set_new_key'  # Flask server URL\nserver_password = 'YourServerPassword'    # Server authentication password\n\n# Passkey settings\ncharacters = '0123456789abcdefABCDEF'  # Passkey character set\nlength = 8                             # Length of the passkey\nfrequency = PasswordFrequency.MINUTE   # Passkey generation frequency\npassword_styles = PasswordStyle.FOUR_ALTERNATE  # Passkey style\n```\n\nEdit the time interval for running the script repeatedly in `multi_run.py`\n\n```python\ntime_period = 60 * 10 # 10 minutes\n# set the time_period to 60 * 60 for 1 hour\n# set the time_period to 60 * 60 * 24 for 1 day\n# set the time_period to 60 * 60 * 24 * 7 for 1 week\n# set the time_period to 60 * 60 * 24 * 30 for 1 month\n# set it as you like\n```\n\n---\n\n### Flask Server Configuration\n\nEdit the following variables in the Flask server code:\n\n```python\npassword_file = \"pass.txt\"              # File to store the passkey\nserver_password = \"YourServerPassword\"  # Authentication password\nTITLE = \"MY WIFI\"                       # Web page title\n```\n\n---\n\n## Usage\n\n### Running the Script\n\n1. Install the required Python libraries.\n2. Update the script configuration as described above.\n3. Run the script:\n   \n   For single run :\n   ```bash\n   python single_run.py\n   ```\n   For repeated runs :\n   ```bash\n   python multi_run.py\n   ```\n\n### Running the Flask Server\n\n1. Install Flask (`pip install flask`).\n2. Run the Flask server:\n\n   ```bash\n   cd ./server\n   python app.py\n   ```\n\n3. Access the server via `http://localhost:5000`.\n\n---\n\n## Flask Server Endpoints\n\n### 1. **Set New Passkey** (`POST /set_new_key`)\n\n- **Description**: Updates the passkey stored on the server.\n- **Request Body**:\n  - `password` (string): Authentication password.\n  - `new_key` (string): New passkey to store.\n- **Response**:\n  - `200 OK`: Passkey updated successfully.\n  - `400 Bad Request`: Invalid password or missing key.\n\n### 2. **Get Passkey** (`GET /get_key`)\n\n- **Description**: Retrieves the saved passkey.\n- **Response**:\n  - `200 OK`: Returns the passkey as JSON.\n\n### 3. **Home Page** (`GET /`)\n\n- **Description**: Displays the current passkey on a web page.\n\n---\n\n## Screenshots\n\n| Router page | Flask Server |\n|------------|-------------|\n| ![Router Page](README_IMAGES/ss2.png) | ![Flask Server](README_IMAGES/ss1.png) |\n\n## Limitations\n\n- The script assumes specific router interface element IDs and classes, which may vary between router models.\n- The default router admin URL and credentials must be manually configured.\n- This repo is mainly focused for **TP-Link EC220-G5** Router.\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nFeel free to fork this repository and submit pull requests to enhance functionality or fix issues.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodernayeem%2Fauto-guest-change","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodernayeem%2Fauto-guest-change","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodernayeem%2Fauto-guest-change/lists"}