Skip to content
Advertisement

Tag: icmp

Pinging servers in Python

In Python, is there a way to ping a server through ICMP and return TRUE if the server responds, or FALSE if there is no response? Answer 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

Advertisement