A small CLI tool to check connection from a local machine to a remote target in various protocols.

CHK

chk is a small CLI tool to check connection from a local machine to a remote target in various protocols.

The following protocols are currently supported:

  • ICMP (Ping)
  • SSH
  • TCP
  • HTTP

chk is indended to help with basic testing of the connection. It can be used in place of combining other tools and does not have any dependencies other than the executable.

With every connection error message, chk will attempt to show an indicative message that will show exactly what the error is and why the connection fails.

Installation

chk can be used by simply downloading the latest Golang executable from the releases page. For comfortable CLI usage, put the executable in a place that is under your PATH environment variable.

Getting Started

Basic help message:

>>> chk 

NAME:
   chk - A simple command line tool to check connection between devices.

USAGE:
   chk [command flags]

COMMANDS:
   ping, icmp  Check if the target address is accessible via ICMP protocol.
   http        Check if the target address is accessible via HTTP.
   tcp         Check if the target address is accessible via TCP.
   ssh         Check if the target address is accessible via SSH.
   help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help (default: false)

Every subcommand's help page be accessed via calling with with the -h attribute:

>>> chk ping -h

NAME:
   c ping - Check if the target address is accessible via ICMP protocol.

USAGE:
   c ping [command options] [arguments...]

OPTIONS:
   --count value, -c value     Amount of ping requests that will be sent. (default: 1)
   --timeout value, -t value   Time to wait for a response in seconds. (default: 1)
   --interval value, -i value  Time to wait between ping requests in seconds if the count is more than 1. (default: 1)
   --verbose, -v               Specifies whether to show verbose information about the ping result. (default: false)
   --help, -h                  show help (default: false)

Examples:

Ping:

>>> chk ping google.com

{
        "PacketsRecv": 1,
        "PacketsSent": 1,
        "PacketLoss": 0,
        "IPAddr": {
                "IP": "216.58.207.78",
                "Zone": ""
        },
        "Addr": "google.com",
        "Rtts": [
                58238468
        ],
        "MinRtt": 58238468,
        "MaxRtt": 58238468,
        "AvgRtt": 58238468,
        "StdDevRtt": 0
}
Successful ping connection to google.com

SSH:

>>> chk ssh localhost

Successful SSH connection to localhost:22.

>>> chk ssh google.com

SSH connection to google.com:22 failed. The following error was received: dial tcp 216.58.207.78:22: i/o timeout

TCP:

>>> chk tcp google.com:443

Successful TCP connection to google.com:443.

>>> chk tcp localhost:443

TCP Connection to localhost:443 failed. Error that was received: 'dial tcp [::1]:443: connect: connection refused

HTTP:

>>> chk http google.com

Successful http connection to http://google.com. Response code that was received: 200

>>> chk http localhost:8080

Got connection refused from http://localhost:8080. Target is reachable but does not listen in the specified port.
Similar Resources

A very basic cli keyring tool to use accross various OS.

A very basic cli keyring tool to use accross various OS.

Dec 14, 2022

Tnbassist - A CLI tool for thenewboston blockchain to perform various mundane tasks like taking daily accounts backup

TNB Assist is a CLI (Command Line Interface) tool for thenewboston blockchain to perform various mundane tasks like taking daily accounts backup, computing statistics, etc easier.

Feb 14, 2022

CLI tool for CIDR range operations (check, generate)

cidrchk A CLI tool to assist you with CIDR ranges and IPs. Install it You can download the latest binary for Linux (Intel and Arm), macOS, and Windows

Nov 27, 2022

Github-org-diff - Simple CLI tool to check a diff between 2 branches of all org repos

github-org-diff Simple CLI tool to list org repos that have diff between dev and

Jan 25, 2022

Go-api-cli - Small CLI to fetch data from an API sync and async

Async API Cli CLI to fetch data on "todos" from a given API in a number of ways.

Jan 13, 2022

Fetches the output for an AWS SSM command for every target

AWSCommander Fetches the output for an AWS SSM command for every target. Optionally outputs as HTML. Examples Get command from Tokio Japan as text AWS

Nov 24, 2021

A Target Tracking , NoteTaking , CheckLists and Data Management GUI App for Bug Hunter's and Pentesters.

A Target Tracking , NoteTaking , CheckLists and Data Management GUI App for Bug Hunter's and Pentesters.

Screenshots Features • Installation • Usage • Features • Notes • Sandman A Target Tracking , NoteTaking , CheckLists and Data Management GUI App for B

Dec 25, 2022

A CLI tool to find the absolute path of any folder in your local file system.

Table of Contents What is this? How to use this Examples of usage How to compile it What am I looking at It's a CLI tool that I made for finding the a

Jan 15, 2022

Small CLI Tool to store test artifacts in a tamperproof way

Small CLI Tool to store test artifacts in a tamperproof way

Oct 3, 2022
Related tags
GC2 is a Command and Control application that allows an attacker to execute commands on the target machine using Google Sheet and exfiltrate data using Google Drive.
GC2 is a Command and Control application that allows an attacker to execute commands on the target machine using Google Sheet and exfiltrate data using Google Drive.

GC2 GC2 (Google Command and Control) is a Command and Control application that allows an attacker to execute commands on the target machine using Goog

Dec 13, 2022
The Keel CLI allows you to setup Keel on your local dev machine or on a Kubernetes cluster
The Keel CLI allows you to setup Keel on your local dev machine or on a Kubernetes cluster

keel-cli What is keel-cli The Keel CLI allows you to setup Keel on your local dev machine or on a Kubernetes cluster, launches and manages Keel instan

Oct 7, 2021
The Dapr CLI allows you to setup Dapr on your local dev machine or on a Kubernetes cluster

Dapr CLI The Dapr CLI allows you to setup Dapr on your local dev machine or on a

Dec 23, 2021
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.

Read the docs at docs.gomplate.ca, chat with developers and community in the #gomplate channel on Gophers Slack gomplate is a template renderer which

Jan 5, 2023
Slack remote terminal - execute commands on remote host using slack slash command

slackRT Slack remote terminal - execute commands on remote host using slack slash command Installation Go to api.slack.com/apps and sign in and create

Jul 12, 2022
tfuzz is a command-line tool to fuzz some layer 7 OSI protocols with a template file

tfuzz tfuzz is a command-line tool to fuzz some layer 7 OSI protocols with a template file download the linux binary executable (or you can compile fr

Sep 29, 2021
Allows you to use the magic remote on your webOS LG TV as a keyboard/mouse for your Linux machine

magic4linux Allows you to use the magic remote on your webOS LG TV as a keyboard/mouse for your PC Linux machine. This is a Linux implementation of th

Nov 25, 2022
A Go library and common interface for running local and remote commands

go-runcmd go-runcmd is a Go library and common interface for running local and remote commands providing the Runner interface which helps to abstract

Nov 25, 2021
Testing local and remote shell commands in Go

Testing local and remote shell commands in Go. This is an (intentionally simplified) example of how unix shell commands can be unit-tested in Go. The

Nov 30, 2021
Run your MapReduce workloads as a single binary on a single machine with multiple CPUs and high memory. Pricing of a lot of small machines vs heavy machines is the same on most cloud providers.

gomap Run your MapReduce workloads as a single binary on a single machine with multiple CPUs and high memory. Pricing of a lot of small machines vs he

Sep 16, 2022