#!/usr/bin/perl -wT $|++; use strict; use CGI qw( header start_html end_html param p ); print header, start_html( "RavenGate TraceRoute Results" ); if ( param('trace') and param('trace') =~ /^[-.0-9a-zA-Z]+$/ ) { print p( "Hello There- I am writing this from " . "scratch so please be patient. Thanks!" ), "
";

    system( "/usr/sbin/traceroute", param('trace') );

    print "
"; print p( "Oops, there was a problem running traceroute" ) if $?; } elsif ( param('trace') ) { print p( "Oops,", param('trace'), "contains illegal characters" ); } else { print p( "Oops, you forgot to give me a host to trace to." ); }