I download code at : http://www.tracert.com/ and now i only config it !

I did config :

#!/usr/bin/perl

use CGI::Carp qw(fatalsToBrowser);

# TRACEROUTE GATEWAY for Windows NT
my $version = 'v1.2';
my $date = '14-Oct-2001';
my $cr = '© Gabor Szabo';
my $crmail = 'gabor@tracert.com';
# Free software - GNU GPL - AS IS, NO WARRANTY...
# please keep author's (my) reference...
#
# Name of the organization
my $orgname = 'quangthinh.trap17.com';
# Home page of the organization
my $orghome = 'http://www.quangthinh.trap17.com/';
# The location of the command:
my $command = '/usr/sbin/traceroute'; # this is usually good for Linux and UNIX

$|=1;
$ENV{PATH}="";

print <<HTML;
Content-type: text/html

<html><head><title>Traceroute Gateway</title></head><body bgcolor=white>
<h1>Traceroute Gateway</h1>
at <a href=$orghome> $orgname</a><p>
<font size=-1>Version: <b>$version</b> Date: <b>$date</b>
Copyright: <b><a href=mailto:$crmail>$cr</a></b></font>
@ <a href=http://www.quangthinh.trap17.com/cgi-bin/tracert.pl>Multiple Traceroute Gateway</a><br>
<a href=http://www.traceroute-gateways.com>Other Traceroute Gateways</a><p>

HTML

my $qs = $ENV{QUERY_STRING};
if (@ARGV) { $qs = $ARGV[0]; } # for command line testing only

if ((defined $qs) and ($qs ne "" )) {
if ($qs =~ /^t=(.*)/) {
$qs=$1;
}
if (($qs =~ /^(\d+\.\d+\.\d+\.\d+)$/) or
($qs =~ /^([a-zA-Z0-9][a-zA-Z0-9\.\-_]*)$/)) {
$qs = $1; # unTaint

print "<hr>";
print "<PRE>";
system "$command $qs";
print "</PRE>";
print "<hr>";
}
}

print <<HTML;
Please type in the IP address or the full name of the machine you want to Traceroute to
<font size=-2 color=white>
<form>
<input name=t>
</form>

HTML



and file at : http://www.quangthinh.trap17.com/cgi-bin/tracert.pl

But it don't work !

 

 

 


Reply