{"id":25135444,"url":"https://github.com/clats97/clatchecker","last_synced_at":"2025-04-03T02:26:38.614Z","repository":{"id":274354621,"uuid":"922648793","full_name":"Clats97/ClatChecker","owner":"Clats97","description":"A simple, easy to use Python script  used to monitor a websites status (whether it is up or down).","archived":false,"fork":false,"pushed_at":"2025-01-26T19:12:42.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T16:38:24.238Z","etag":null,"topics":["downdetect","downdetector","isitdown","trending","trending-repositories","webmonitor","webmonitoring","website","websupport"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Clats97.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-26T18:51:50.000Z","updated_at":"2025-01-26T19:19:28.000Z","dependencies_parsed_at":"2025-01-26T20:18:38.657Z","dependency_job_id":null,"html_url":"https://github.com/Clats97/ClatChecker","commit_stats":null,"previous_names":["clats97/clatchecker"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatChecker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatChecker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatChecker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatChecker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Clats97","download_url":"https://codeload.github.com/Clats97/ClatChecker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246923978,"owners_count":20855649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["downdetect","downdetector","isitdown","trending","trending-repositories","webmonitor","webmonitoring","website","websupport"],"created_at":"2025-02-08T16:32:55.831Z","updated_at":"2025-04-03T02:26:38.593Z","avatar_url":"https://github.com/Clats97.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ClatChecker DownDetector Tool\n\nA Python script for monitoring multiple website domains in real-time, displaying whether they are accessible (“up”) or unreachable (“down”). It also logs these status checks to a file (`website_monitor.log`). This tool runs until the user presses **ENTER**, allowing continuous website monitoring.\n\n![clatchecker](https://github.com/user-attachments/assets/09f3dfc8-8254-45d1-bc33-235b6395dcda)\n\n## Features\n- **Multi-Domain Monitoring**: Checks multiple domains (entered by the user) in one script run.\n- **Real-Time Checking**: Monitors each domain’s status every 1 second.\n- **Immediate Stop**: Press **ENTER** at any time to halt the continuous check loop.\n- **Colorful Output**: Uses the [Pystyle](https://pypi.org/project/Pystyle/) library for styled console printing (e.g., banners, color-coded text).\n- **Logging**: Records each check result (e.g., “up”, “down”, errors) in `website_monitor.log`.\n\n## How It Works\n\n1. **User Input**:  \n   - The script prompts you to input one or more domains (separated by commas).\n\n2. **Background Thread**:\n   - A separate “stopper” thread waits for the user to press **ENTER**.\n   - Once pressed, it sets a `stop_flag` to `True`, signalling the monitoring loop to stop.\n\n3. **Monitoring Loop**:\n   - Repeatedly sends `GET` requests (via `requests.get()`) to each domain every 1 second.\n   - If a domain returns an HTTP status code of **200**, it prints `\"[+] \u003cdomain\u003e is up\"`.\n   - If the HTTP code is not 200 or an exception occurs, it prints and logs a message indicating the site is down or inaccessible.\n   - Continues indefinitely until **ENTER** is pressed.\n\n4. **Logging**:\n   - Saves each status check (timestamped) to `website_monitor.log` using the Python `logging` module.\n\n## Installation\n\n1. **System Requirements**:\n   - **Python 3.6+** recommended.\n   - OS compatibility: The script should work on any OS (Windows, macOS, Linux) as long as `pystyle` supports it.\n\n2. **Python Libraries**:\n   - [`requests`](https://docs.python-requests.org/en/master/)  \n   - [`pystyle`](https://pypi.org/project/Pystyle/)  \n   - `logging` (standard library)  \n   - `time` (standard library)  \n   - `threading` (standard library)\n\n3. **Install Required Libraries**:\n\npip install requests pystyle\n\n## Usage\n\n1. **Clone or Copy** the script (e.g., `down_detector.py`) to your local machine.\n\n2. **Run the Script**\n\n3. **Input Domains**:\n   - When prompted, enter one or more domain names separated by commas (e.g., `https://example.com, https://anotherdomain.com`).\n\n4. **Monitoring**:\n   - The script will check each domain in a loop every 1 second.\n   - It will display whether each domain is up or down in the console.\n\n5. **Stop Monitoring**:\n   - At any time, press **ENTER** in the console window.\n   - The script will exit the loop and print “Monitoring stopped.”\n\n## Configuration\n\n- **Check Interval**:\n  - Currently hard-coded to **1 second** (`time.sleep(1)` in the `monitor_websites()` function).  \n  - Adjust as needed for heavier or lighter monitoring frequencies.\n\n- **Logging Setup**:\n  - Logging is configured in the `main()` function with:\n    \n    logging.basicConfig(\n        filename='website_monitor.log',\n        level=logging.INFO,\n        format='%(asctime)s - %(levelname)s - %(message)s'\n    )\n  \n  - Modify `filename`, `level`, or `format` as desired.\n\n## Limitations and Known Issues\n\n1. **Heavy Logging**:\n   - Checking every second and logging each result can quickly grow `website_monitor.log`.  \n   - Consider rotating logs or adjusting the check interval.\n\n2. **No HTTPS Verification Settings**:\n   - Currently, SSL verification is not altered. If you require special SSL certificates or want to disable verification, you must adjust the `requests.get()` parameters.\n\n3. **Script Running Indefinitely**:\n   - The script only stops when **ENTER** is pressed, so it’s not suitable for use in a purely headless environment (unless you modify the code).\n\n4. **Connectivity Issues**:\n   - A domain returning a non-200 code is flagged as “down,” but the domain may actually be reachable with a different status code. Modify as needed if your use case differs (e.g., for APIs returning 201, 204, etc.).\n\n## Troubleshooting\n\n- **Pressing ENTER Doesn’t Stop**:\n  - In some shells or IDEs, the input buffering behavior might vary. Ensure you are running the script in a standard terminal or console.\n\n- **Logging Not Working**:\n  - Check that you have write permissions to the directory where the script runs.  \n  - Verify the `logging` level and filepath in `logging.basicConfig`.\n\n- **ImportError for `pystyle`**:\n  - Make sure you installed the library with `pip install pystyle`.  \n  - If installed globally, confirm your Python interpreter in the environment can see it.\n\n**Author**:  \n🛡️ By Joshua M Clatney - Ethical Pentesting Enthusiast 🛡️  \n**Version**: 1.00  \n\n**Disclaimer**: This script is provided as-is for basic website monitoring. Please adapt configurations (e.g. interval, logging verbosity) to your own requirements.\n\nCopyright 2025 Joshua M Clatney (Clats97)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclats97%2Fclatchecker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclats97%2Fclatchecker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclats97%2Fclatchecker/lists"}