Spread the love

On Linux systems, the quintessential tool for scanning and discovering hosts is Nmap. Today we show how to ping a port number with TCPing that will help us perform port scans on Windows systems. All this through the command line (command prompt) in a very simple way.

How to ping a port number?

TCPing is a tool that runs through the console and works very similarly to the typical “ping.” Still, instead of using the ICMP protocol with echo-request and echo-reply, it uses the TCP protocol and is capable of Show us if a certain port of a device is open, or on the contrary, it is closed.

ping a port number with TCping

Typing is also able to use the “-h” option; what it does is connect to a specific host using the HTTP protocol. With this option, in addition to telling us if port 80 (by default) is open, you will be able to show us the HTTP states, such as the 200 OK state.

To test this tool, the first thing you have to do is download it from its official website. Then you have the link to the tool where its direct download is:

There are two versions available, one for 32-bit operating systems and one specific for 64-bit operating systems.

When we download it, we open a command prompt (cmd.exe). We go to the path where we have saved the tool and put the name of the tool directly to execute it. By not entering any parameter, by default, we will get the help of TCPing directly.

In this TCPing help, we have all the parameters

The most interesting are the following:

  • 4: use the IPv4 protocol for connection.
  • 6: use the IPv6 protocol for connection.
  • t: perform a “ping” TCP continuously until we cancel with Control-C.
  • n NUM: Performs a certain number (NUM) of pings to a host.
  • S: allows us to select the source IP address of the packets, we must have this IP in the system itself.
  • j: will show us the jitter of the connection.
  • Destination: IP or domain of the host we want to scan.
  • Port: the port from 1 to 65535 that we want to scan. By default, it is 80 if we do not specify anything.

In the following screenshot, you can see a TCping against redeszone, using port 22 (SSH) and also port 80 of HTTP. In the first case, there is no answer because the port is closed, and in the second case, we do have an answer.

TCping against www.redeszone.net

If we want to verify the jitter of the connection, we can put the option «-j» and it will show it to us in each of the «pings» that it performs against the chosen host.

In the introduction, we explained that this tool is also capable of sending tests in HTTP mode; in this way, we can also know the status of the different web pages easily and quickly. Now we will place the following order to receive the HTTP status:

We will get the state is a 301, a redirection (to HTTPS), as you can see below:

Other options available to us are the possibility of including the target URL in the request with «-u» and also using POST and HEAD methods instead of getting. Tcping has also incorporated the possibility of making connections if we are behind a Proxy, in the help you have the syntax that you should use for it.

Leave a Reply

Your email address will not be published. Required fields are marked *