Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Program that checks if ip addresses or websites are active or not, using shell ping command.

License

Notifications You must be signed in to change notification settings

1RaY-1/check-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

62 Commits

Repository files navigation

About

Simple program to check if IP addresses are active or not using ping command.

How it works

It simply pings a website (of your choice) and depending on the status code returned by the ping command, it determines the status of the website or IP address.

Possible statuses are:

  • 0 => Alive
  • 1 or 256 => Unreachable
  • 2 or 68 => Unknown host
  • [Any other code] => Unknown

Screenshots


Supported Operating Systems

  • Windows
  • Linux
  • Android (via Native Linux Terminal, not tested yet)

General Requirements

  • Internet connection

Installation

On Windows

Open PowerShell with Admin privileges and run this command:

Set-ExecutionPolicy RemoteSigned; Invoke-WebRequest https://raw.githubusercontent.com/1ray-1/check-ip/main/insta ll-windows.ps1 -OutFile "$PWD\install-windows.ps1"; .\install-windows.ps1

After that, unless you really need to execute other PowerShell scripts, I recommend disabling script execution for better security

Set-ExecutionPolicy Restricted

On Linux

Open terminal and run this command:

wget https://raw.githubusercontent.com/1ray-1/check-ip/main/insta ll-linux.sh; chmod +x install-linux.sh; clear; bash install-linux.sh

You'll need to enter your sudo password

In both cases (Linux and Windows), the required executable (for your system architecture) will be installed in a directory that's in your PATH, so you can run it by simply typing check-ip in the terminal or CMD

From releases

You can just download the executable file for your OS here and execute it.

From source

You can download this repo and compile check-ip.c manually (using C compiler).

How to use (from CMD/Terminal)

Usage: check-ip [OPTION] IP_ADDRESSES_TO_CHECK

Options:
-s Save data to data.txt
-h, --help Get help text

How to remove

On Windows

Open CMD with admin privileges and type:

  • del C:\Windows\System32\check-ip.exe

On Linux

Open terminal and type:

  • sudo rm $(which check-ip)

More

Note: I'm not a C programmer. The code is simple and could be improved, but it works.

About

Program that checks if ip addresses or websites are active or not, using shell ping command.

Topics

Resources

Readme

License

MIT license

Stars

Watchers

Forks

Contributors 2