So I created library which uses raw sockets and Internet Control Message Protocol (ICMP) to do basically anything with ICMP allows, but I focused on ping and traceroute.
It's probably only IPv4 (IPv6 was not tested and it's not supported, however some messages may work, I didn't study ICMP6 to see which messages are the same). IPv6 support is planned.
Usage is very simple:
ping:
import pyicmp.pingtraceroute:
p = pyicmp.ping.Ping('1.2.3.4')
import pyicmp.tracerouteYeah, it's that simple.
t = pyicmp.traceroute.TraceRoute('1.2.3.4')
See docstrings for each classes for more details.
Oh and there is one bad thing... It requires root (administrator for windows) permissions and it'll remain this way, it's not possible to bypass this problem.
You can clone from here: git://github.com/volftomas/pyicmp.git
No comments:
Post a Comment