![]() |
|
[Python] Traceroute program - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Traceroute program (/showthread.php?tid=4786008) |
Traceroute program - Dr_Ciphers - Apr 19, 2015 I have the following python code which implements a traceroute program. The python that i'm using is the 2.7.8 Code #!/usr/bin/pythonAlthough when executed i get the following error. Traceback (most recent call last): File "./traceroute.py", line 56, in <module> main() File "./traceroute.py", line 39, in main a= send_socket.setsockopt(socket.SOL_IP, socket.IP_TTL, ttl) File "/usr/lib/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 22] Invalid argument Any ideas would be appreciated! Thank you. * - MR.FREE - Apr 19, 2015 Errno 22 is because your trying to connect to a none existent server/port http://pastebin.com/BEgFdbfS Spoiler (Click to View) Below works for me. Spoiler (Click to View) * - Dr_Ciphers - Apr 21, 2015 Thank you MR. FREE. I'm doing modifications on my code and will check it again. |