473,386 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Ping Implementation in Python

Hi,
I was wondering if there was a ping implementation written in
Python. I'd rather using a Python module that implements ping in a
platform/OS-independent way than rely on the underlying OS, especially
as every OS has a different implementation. Furthermore, if you're
going to ping a large number of IPs, using a module would probably be
a lot faster. Any ideas if such a module exists? Thanks.
Dec 20 '07 #1
5 2179
On Dec 20, 2007 9:41 AM, Mrown <ma*********@fastmail.fmwrote:
Hi,
I was wondering if there was a ping implementation written in
Python. I'd rather using a Python module that implements ping in a
platform/OS-independent way than rely on the underlying OS, especially
as every OS has a different implementation. Furthermore, if you're
going to ping a large number of IPs, using a module would probably be
a lot faster. Any ideas if such a module exists? Thanks.

There's no point in having a script that pings things, especially
large numbers of IPs. If you really want to do network scanning other
tools for that already exist.
Dec 20 '07 #2
On Dec 20, 6:13 pm, "Chris Mellon" <arka...@gmail.comwrote:
On Dec 20, 2007 9:41 AM, Mrown <mathewbr...@fastmail.fmwrote:
Hi,
I was wondering if there was a ping implementation written in
Python. I'd rather using a Python module that implements ping in a
platform/OS-independent way than rely on the underlying OS, especially
as every OS has a different implementation. Furthermore, if you're
going to ping a large number of IPs, using a module would probably be
a lot faster. Any ideas if such a module exists? Thanks.

There's no point in having a script that pings things, especially
large numbers of IPs. If you really want to do network scanning other
tools for that already exist.
Thanks. Actually, I was more interested in the OS neutral part than
in pinging a large number of IPs. Instead, I want to ping a number of
IPs (under 10) in an OS/platform independent manner and take the
necessary action depending on the results. Thanks.
Dec 20 '07 #3
Nel mezzo del cammin di nostra vita, mi ritrovai con Mrown che diceva:
Hi,
I was wondering if there was a ping implementation written in
Python. I'd rather using a Python module that implements ping in a
platform/OS-independent way than rely on the underlying OS, especially
as every OS has a different implementation. Furthermore, if you're
going to ping a large number of IPs, using a module would probably be a
lot faster. Any ideas if such a module exists? Thanks.

Get Scapy, it's one of the best tool for this kind of problem, and it's
Python based

--
"Le opinioni dei fanatici prescindono dai fatti"
python -c "print 'bG9ybWF5bmFAZ21haWwuY29t'.decode('base64')"
Dec 20 '07 #4
On Dec 20, 5:41 am, Mrown <mathewbr...@fastmail.fmwrote:
Hi,
I was wondering if there was a ping implementation written in
Python.
http://www.gnist.org/~lars/code/ping/ping.html
Dec 20 '07 #5
Roger Miller wrote:
On Dec 20, 5:41 am, Mrown <mathewbr...@fastmail.fmwrote:
Hi,
I was wondering if there was a ping implementation written in
Python.

http://www.gnist.org/~lars/code/ping/ping.html
Thanks for your replies. I'll probably start invesigating with
Roger's suggestion. Scapy would definitely be able to do the job, but
it's a little too much if all I want is to ping the host.
Furthermore, to even get it to run on an OS such as Windows, you have
to install a number of additional packages (refer to
http://trac.secdev.org/scapy/wiki/Wi...tallationGuide) which will
make deployment in an OS/platform neutral way more difficult.
Dec 22 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike Mallory | last post by:
Can Java perform two pings at one time and display the best ping time with the best result? Also, can Java perform two trace routes at one time and display the trace with the fewest hops? ...
2
by: Alberto Vera | last post by:
Hello: Is it possible to make "ping" from Python and get statistics like using command prompt from Windows? How Can I capture them into variables? Thanks Pinging XXXX.XXXX.XXXX.XXXX with...
2
by: Count László de Almásy | last post by:
Greetings, I'm in need of a simple GUI application that "monitors" a range of hosts using ping and reports on their status by changing the panel color for that host (i.e, green for pingable, red...
3
by: Jason Rodman | last post by:
I have downloaded every example on how to create a ping utility in .Net in both VB and C#, but have been disappointed with the results. I have YET to find an example that returns consistent results...
8
by: Nico Grubert | last post by:
Hi there, I could not find any "ping" Class or Handler in python (2.3.5) to ping a machine. I just need to "ping" a machine to see if its answering. What's the best way to do it? Kind...
7
by: Linus Cohen | last post by:
Hi all, I'm a newbie to python and programming in general, so I wanted a simple project to start off. What I'm trying to do here is write a python command-line ping program, much like the Unix and...
1
by: Mauro \Baba\ Mascia | last post by:
Hi, this is my question: I want to know if several switch (about 50) in a big lan are up and then know their MAC addresses to do a list that contains host name, ip and mac. I know only the range...
1
by: Karl Kobata | last post by:
Hi Fredrik, This is exactly what I need. Thank you. I would like to do one additional function. I am not using the tokenizer to parse python code. It happens to work very well for my...
1
by: ScottZ | last post by:
With python 2.6 and wxpython I'm trying to create a system tray icon application based around an example found here:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.