#!perl.exe use strict; use CGI qw(:all); use CGI::Carp('fatalsToBrowser'); print header(); print "
"; print "Netstat Viewer\n"; print <All Connections | Ethernet Statistics | Routing Table HTMLEND if (param('netstat') eq "allconnections") { # All Connections my @netstats = `netstat.exe -o -a -n `; map { chomp $_; s|(\d+)\r|$1\r|i; print $_; } @netstats; } elsif (param('netstat') eq "routingtable") { # Routing Table print `netstat.exe -r`; } elsif (param('netstat') eq "ethernetstats") { # Ethernet Statistics print `netstat.exe -e -s`; } elsif (param('tlist')) { my $pid = param('tlist'); my @tlist = `tlist $pid`; if (@tlist) { print "kill this process!\n\n"; print @tlist; } } elsif (param('kill')) { my $pid = param('kill'); print `kill -f $pid`; } exit;