Skip to main content

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

Project description

https://img.shields.io/pypi/v/hostchk.svg https://img.shields.io/github/license/brigxt0/hostchk.svg:target:https://github.com/brigxt0/hostchk/blob/aeded164c0fcf70cf38d09a976b6197ef74a3541/LICENSE

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.

Installation

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 https://github.com/brigxt0/hostchk.git
$ cd hostchk
$ pip3 install -r requirements.txt

Usage

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

hostchk [-h] -in INFILE -out OUTPFILE

[-proto PROTOCOL]



options:

  -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]

Examples

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

End

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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file hostchk-1.1.6.tar.gz.

File metadata

  • Download URL: hostchk-1.1.6.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.0

File hashes

Hashes for hostchk-1.1.6.tar.gz
Algorithm Hash digest
SHA256 8e29ebb9695869865186dada73309908464b86d203611dc8a4d13f977fb81793
MD5 7d8d86b26bccf18c664c97e8a0ed71e0
BLAKE2b-256 5985a9985fd13bfa6f64507a82f38151c63bd31bdff0010e92541f743581a088

See more details on using hashes here.

File details

Details for the file hostchk-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: hostchk-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.0

File hashes

Hashes for hostchk-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 689ece609fcd42c4b89ced84a150967c02b2036ec55eaaedd3e10cdd6a4b978e
MD5 78a387c3e90158292919b72f87cd5983
BLAKE2b-256 3d5ec4762067e2555ebdbd49dd277eea394526292b6b3b6ad0b7045e304ef964

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page