Ping a Specific Port

You can’t ping ports, as Ping is using ICMP which is an internet layer protocol that doesn’t have ports. Ports belong to the transport layer protocols like TCP and UDP. However, you could use nmap to see whether ports are open or not nmap -p 80 example.com Edit: As flokra mentioned, nmap is more than … Read more

How to ping an IP address

You can not simply ping in Java as it relies on ICMP, which is sadly not supported in Java http://mindprod.com/jgloss/ping.html Use sockets instead Hope it helps

Ping with timestamp on Windows CLI

note: code to be used inside a batch file. To use from command line replace %%a with %a Start the ping, force a correct line buffered output (find /v), and start a cmd process with delayed expansion enabled that will do an infinite loop reading the piped data that will be echoed to console prefixed … Read more

Pinging servers in Python

This function works in any OS (Unix, Linux, macOS, and Windows)Python 2 and Python 3 EDITS:By @radato os.system was replaced by subprocess.call. This avoids shell injection vulnerability in cases where your hostname string might not be validated. Note that, according to @ikrase on Windows this function will still return True if you get a Destination Host Unreachable error. Explanation The command is ping in both Windows and … Read more

Pinging servers in Python

This function works in any OS (Unix, Linux, macOS, and Windows)Python 2 and Python 3 EDITS:By @radato os.system was replaced by subprocess.call. This avoids shell injection vulnerability in cases where your hostname string might not be validated. Note that, according to @ikrase on Windows this function will still return True if you get a Destination Host Unreachable error. Explanation The command is ping in both Windows and … Read more