How to "ping" a host ?

Matthew Dixon Cowles matt at mondoinfo.com
Tue Jan 8 13:32:44 EST 2002


On Tue, 8 Jan 2002 12:35:16 +0100, Gillou <nospam at bigfoot.com> wrote:

>Thanks Matthew, but reading the doc, your script must be executed by
>a root user. This is an issue for the intented use I'm planning for
>my customer.

That's going to be true of anything that opens a raw socket and
anything that sends a ping will need to open a raw socket:

$ ls -l /bin/ping
-rwsr-xr-x    1 root     root        22620 Jan 16  2001 /bin/ping

But I certainly understand your security concerns. In that case it
might be best to open a pipe from /bin/ping and parse the output.

Regards,
Matt



More information about the Python-list mailing list