Re: pinging from within python

2005-09-18 Thread Harlin Seritt
You can do the following: import os data = os.popen('ping machineName').read() if 'request timed out' in data or 'unknown host' in data: Ping Failed Code else: Ping Returned Something Good Code This is the quickest and really most effective way to get it done IMO. Harlin Seritt

Re: pinging from within python

2005-09-17 Thread Jorgen Grahn
On Mon, 12 Sep 2005 01:36:35 +0200, billiejoex [EMAIL PROTECTED] wrote: Impacket module can helps you to construct the ip/icmp packet structure, then you can send the packet and wait for the ECHOREPLY by using a RAW_SOCKET. Here's an example: http://oss.coresecurity.com/impacket/ping.py

pinging from within python

2005-09-11 Thread M.N.A.Smadi
hi; I need a simple script to run the ping command with some parameters and be able to read the return value of the ping function. Any pointers will be appreciated thanks m.smadi -- http://mail.python.org/mailman/listinfo/python-list

Re: pinging from within python

2005-09-11 Thread Grant Edwards
On 2005-09-11, M.N.A.Smadi [EMAIL PROTECTED] wrote: I need a simple script to run the ping command with some parameters and be able to read the return value of the ping function. Any pointers will be appreciated http://www.google.com/search?hl=enq=python+ping -- Grant Edwards

Re: pinging from within python

2005-09-11 Thread billiejoex
Impacket module can helps you to construct the ip/icmp packet structure, then you can send the packet and wait for the ECHOREPLY by using a RAW_SOCKET. Here's an example: http://oss.coresecurity.com/impacket/ping.py Cheers I need a simple script to run the ping command with some parameters