If you look at traceroute.pl and look for the string 'test' you will see how to do this.
It assumes you know about the perl debugger, i.e, how to user perl -d -T.
If not then just set up the environment variables and use the command:
Code Block |
---|
time traceroute.pl |
Below is an example:
Code Block |
---|
4cottrell@pinger:~$setenv QUERY_STRING 'target=ipv6.google.com' ; setenv REMOTE_HOST ipv6.google.com 5cottrell@pinger:~$setenv REMOTE_ADDR 72.14.204.105 ; setenv SERVER_NAME www.slac.stanford.edu 6cottrell@pinger:~$setenv REQUEST_URI /cgi-wrap/traceroute.pl 7cottrell@pinger:~$setenv QUERY_STRING 'target=www.slac.stanford.edu&function=traceroute' 10cottrell@pinger:~$time bin/traceroute.pl Content-type: text/html <html> <head> <title>traceroute from 134.79.104.80 (www.slac.stanford.edu) to 134.79.197.200 (www.slac.stanford.edu) for 72.14.204.105</title> <meta name='robots' content='noindex,nofollow'> </head> <body> <div align='center'><table border='1'> <tr><td align='center'><a href='http://www.stanford.edu/'> <img src='http://www.slac.stanford.edu/comp/net/wan-mon/stanford-seal.gif' alt='Stanford University seal' title='Stanford University seal'></a> <a href='http://www.slac.stanford.edu/'> <\!-\- <img src='http://www.slac.stanford.edu/icon/slac3.gif' \--> <img src='http://www.slac.stanford.edu/icon/newlogo-sm.gif' alt='SLAC logo, click here to learn more about SLAC' title='SLAC logo, click here to learn more about SLAC' ></a> </td><td align='center'><h2>traceroute from 134.79.104.80 (www.slac.stanford.edu) to 134.79.197.200 (www.slac.stanford.edu) for 72.14.204.105</h2> CGI script maintainer: <a href='mailto:cottrell@slac.stanford.edu'><i> Les Cottrell</i></a>, <a href='http://www.slac.stanford.edu/'>SLAC</a>. Script version 6.1, 2/15/2013, Les Cottrell.<br> <a href='http://www.slac.stanford.edu/comp/net/traceroute/traceroute.pl'> Download perl source code</a>.<br><small>To perform a <\!-\- a href='http://boardwatch.internet.com/mag/96/dec/bwm38.html' \--> traceroute/ping/tracepath function from www.slac.stanford.edu to the target, enter the desired target <a href='http://en.wikipedia.org/wiki/Domain_name'>host.domain</a> (e.g. www.yahoo.com) or <a href='http://en.wikipedia.org/wiki/IP_address'>Internet address</a> (e.g. 137.138.28.228) in the box below. Note the fucntion is performed for the target's resolved Internet address.</small> <form action='/cgi-wrap/traceroute.pl' method='GET'> Enter target name or address: <input type='text' size='30' name='target'> then push 'Enter' key. <input type='hidden' name='function' value='traceroute'> </form>Lookup: <a href='http://www.networksolutions.com/cgi-bin/whois/whois'>domain name</a> \| <\!-\- <a href='http://cello.cs.uiuc.edu/cgi-bin/slamm/ip2ll/'>latitude & longitude</a> \| --> <a href='http://www.geoiptool.com/'>Locating a Host</a> \| <a href='http://visualroute.visualware.com/'>visual traceroute</a> \| <a href='http://www.fixedorbit.com/trace.htm'>Find AS's between hosts</a> \| <a href='http://asn.cymru.com/cgi-bin/whois.cgi'>Find AS of a host</a> \| <a href='http://www.ietf.org/rfc/rfc2142.txt'>contacting someone</a> </td><td><b>Related web sites</b><br><a href='http://www.slac.stanford.edu/comp/net/wan-mon/traceroute-srv.html'> <b>Traceroute servers</b></a>,<br><a href='http://www.slac.stanford.edu/comp/net/wan-mon/tutorial.html'> Monitoring tutorial</a>,<br><a href='http://www-iepm.slac.stanford.edu/'> Internet monitoring</a><br><a href='http://www.ipaddressworld.com/'>What is my IP address?</a></tr></table></div> <table bgcolor='yellow'><tr><td align='center'><font color=red><b> Please note that traceroutes can appear similar to port scans. If you see a suspected port scan alert, for example from your firewall, with a series of ports in the range 33434 - 33465, coming from www.slac.stanford.edu it is probably a reverse traceroute from our web based reverse traceroute server. Please do NOT report this to us, it will almost certainly be a waste of both of our times. For more on this see<br> <a href='http://www.slac.stanford.edu/comp/net/wan-mon/traceroute-srv.html#security'> Traceroute security issues</a>.</b></font></td></tr></table> <pre> Executing exec(traceroute, \-m 30 \-q 1 \-w 3, 134.79.197.200, 140) traceroute to 134.79.197.200 (134.79.197.200), 30 hops max, 140 byte packets 1 rtr-servcore1-serv01-iepm.slac.stanford.edu (134.79.104.66) 0.327 ms 2 www1.slac.stanford.edu (134.79.197.200) 0.342 ms 0.093u 0.031s 0:00.12 100.0% 0+0k 0+0io 0pf+0w |