- Name: httpcheck
- Version: 1.2.0
- Programming language: Python 3
- Author: Thomas J. Dyhr
- Purpose: CLI tool to Check Website HTTP Status
- Release date: 19. Marts 2024
site return http status codes for one or more websites
-h, --help show this help message and exit -t, --tld check if domain is in global list of TLDs -q, --quiet only print errors -v, --verbose increase output verbosity -c, --code only print status code -f, --fast fast check wtih threading --version show program's version number and exit
enter sites in url or 'no' url form: 'httpcheck duckduckgo.com'
read sites from a file: 'httpcheck @domains.txt'.
clone repo and install requirements.
git clone https://github.com/docdyhr/httpcheck
cd httpcheck/
python3 -m pip install -r requirements.txt --user
set up a virtual environment with venv.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
or
mv httpcheck.py ~/bin/httpcheck # any other bin folder
chmod + ~/bin/httpcheck
python3 httpcheck.py https://duckduckgo.com
returns ex. 'duckduckgo.com 200'
python httpcheck.py -v https://api.github.com/invalid
returns verbose output ex. '[-] api.github.com --> Client errors: 404 Not Found'
httpcheck -q @domains.txt
only returs http status code errors ex. 'api.github.com 404'
httpcheck -c 1.1.1.1
status code only ex. '200'
checking one or more websites by constantly opening a browser seems a waste of time. Providing a cli tool that can be used in a bash shell, pipe or for scheduling tasks in cron, notifying the user, seems the way to go. The python requests library seems perfect for the job.