diff options
Diffstat (limited to 'httpd/cgi-bin/traceroute')
-rwxr-xr-x | httpd/cgi-bin/traceroute | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/httpd/cgi-bin/traceroute b/httpd/cgi-bin/traceroute deleted file mode 100755 index 9816c0b..0000000 --- a/httpd/cgi-bin/traceroute +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/local/bin/perl -# -# traceroute: a CGI script that provides a Web interface to traceroute -# -# Copyright 1998 Gerald Oskoboiny <gerald@w3.org> -# -# This source code is available under the license at: -# http://www.w3.org/Consortium/Legal/copyright-software -# -# $Id: traceroute,v 1.3 2001-12-21 23:39:27 gerald Exp $ -# - -print <<"EOF"; -Content-Type: text/html - -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> - -<head> - <title>service discontinued</title> -</head> - -<body> - -<p> - Sorry, the traceroute service that used to be here has been turned off due to - abuse. There are a number of other <a - href="http://www.google.com/search?q=traceroute">traceroute gateways</a> - online, please use one of those instead. (if you are specifically interested - in the route from MIT, see <a - href="http://jis.mit.edu:8001/cgi-bin/traceroute">TraceRoute from MIT</a>.) -</p> - -<hr> -<address> -<a href="http://www.w3.org/People/Gerald/">Gerald Oskoboiny</a><br> -\$Date: 2001-12-21 23:39:27 $ \ -</address> - -</body> -EOF - -exit; # turned off due to abuse; the real script follows: - -$| = 1; - -# accept either traceroute/foo or traceroute?foo; default to REMOTE_ADDR -# if nothing else is specified -$addr = $ENV{PATH_INFO} || $ENV{QUERY_STRING} || $ENV{REMOTE_ADDR}; - -$addr =~ tr/+/ /; -$addr =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; -$addr =~ s,^addr=,,; -$addr =~ s/[^A-Za-z0-9\.-]//g; # for security - -print <<"EOF"; -Content-Type: text/html - -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> - -<head> - <title>Traceroute from validator.w3.org to $addr</title> - <link rev="made" href="mailto:gerald\@w3.org"> -</head> - -<body bgcolor="#FFFFFF" text="#000000" link="#0000ee" vlink="#551a8b"> - -<p> - Here is the result of a traceroute from <code>validator.w3.org</code> - to <code>$addr</code>: -</p> - -<form action="/traceroute"> - <input type=text name=addr size=40 value="$addr"> - <input type=submit value="Traceroute"> - <input type=reset> -</form> - -<pre> -EOF - -open( TRACEROUTE, "/usr/sbin/traceroute $addr | " ) || - die "couldn't open pipe to traceroute! $!"; - -while (<TRACEROUTE>) { - chomp; - s/\&/\&/g; - s/\</\</g; - print "$_\n"; -} -close( TRACEROUTE ) || die "couldn't close pipe to traceroute! $!"; - -print <<"EOF"; -</pre> - -<hr> -<address> -<a href="http://www.w3.org/People/Gerald/">Gerald Oskoboiny</a><br> -\$Date: 2001-12-21 23:39:27 $ \ -</address> - -EOF - -exit; - |