Skip to main content

A command-line tool for checking HTTP status codes and server response headers of URLs

Project description

hostchk is a python 3 CLI tool for checking the HTTP status codes and server response headers of URLs.As arguments to the script a file of URLs seperated by lines is required . As well as the name of the file in which to save the output.Note by default the output is saved in the same directory as the input. arguments. Furthermore, the protocol either https or http can be passed using the -proto option to process the URLs and check their statuses.


hostchk is available on the python repository, PyPI and can be installed using pip as follows:

$ pip install hostchk

Hostchk requires 3rd party packages to run without which it will not run.It can be cloned from GitHub as:

$ git clone
$ cd hostchk
$ pip3 install -r requirements.txt


If you installed your hostchk via pip you can run it from any directory as

hostchk [-h] -in INFILE -out OUTPFILE

[-proto PROTOCOL]


  -h, --help       show this help message and exit

  -in INFILE       The input file name

  -out OUTPFILE    The output file name

  -proto PROTOCOL  The protocol to scan with

If you cloned your hostchk directly from Github you can run it as follows

$ cd hostchk
$ python -m  hostchk [-h] -in INFILE -out OUTPFILE
[-proto PROTOCOL]


Run the script installed via pip from a directory containing an arbitrary file of urls named hosts.txt while saving to an output file named status.txt with protocol as https.

$ hostchk -in files -out status

Run the script installed via pip from an arbitrary directory which does not contain the input filename named input.txt with protocol set to http.

$ hostchk -in /path/to/input.txt -out /path/to/output. txt -proto http://

Run the script cloned from Github as a module inside the hostchk directory for an input.txt in the downloads folder.

$ cd hostchk
$ python -m hostchk -in ~/storage/downloads/input.txt -out ~/storage/downloads/output.txt


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hostchk-1.1.6.tar.gz (23.5 kB view hashes)

Uploaded source

Built Distribution

hostchk-1.1.6-py3-none-any.whl (6.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page