[caiu] Regra que uso no meu Site para PING e TRACE

wagner nascimento wagner.nascimento em gmail.com
Quarta Janeiro 23 16:40:20 BRST 2013


Regra PING:

#!/usr/bin/perl
# Wagner Nascimento

$QUERY_STRING = $ENV{'QUERY_STRING'};

$|=1;

print "Content-type: text/html\n\n";
print "<html><head><title>Web Ping</title>\n";
#print "</head><body background='/adm/imagens/onda2.jpg'>\n";
print "</head><body>\n";
#print "<center><img src='/adm/imagens/webping.jpg'></center>\n\n" ;
print "<center><font face=Verdana, Arial, Helvetica, sans-serif
color=#000000 size=4><B>WEBPING</B></font></center>\n\n" ;

if ("$QUERY_STRING" ne "") {
  print "<hr width='90%'>";
  print "<table width='90%' align='center'>";
  print "<tr>";
  print "<PRE>";
  system "ping -c 5 $QUERY_STRING";
  print "</tr>";
  print "</table>";
}

print "<center><strong><font face=verdana, Arial, Helvetica, sans-serif
color=#000000 size=2>";
print "<ISINDEX PROMPT='Informe o endereço para pingar:  '>";
print "</font></strong></center>";
print "<br>";
print "<center>";
print "<a href='/adm/diagnostico.html'><img
src='/adm/imagens/botao_voltar.gif' border='0'></a></center>";


Script Tracert

#!/usr/bin/perl
# Wagner Nascimento

$QUERY_STRING = $ENV{'QUERY_STRING'};

$|=1;

print "Content-type: text/html\n\n";
print "<html><head><title>Web Ping</title>\n";
#print "</head><body background='/adm/imagens/onda2.jpg'>\n";
print "</head><body>\n";
#print "<center><img src='/adm/imagens/webping.jpg'></center>\n\n" ;
print "<center><font face=Verdana, Arial, Helvetica, sans-serif
color=#000000 size=4><B>WEB TRACER</B></font></center>\n\n" ;
if ("$QUERY_STRING" ne "") {
  print "<hr width='90%'>";
  print "<table width='90%' align='center'>";
  print "<tr>";
  print "<PRE>";
  system "traceroute $QUERY_STRING";
  print "</tr>";
  print "</table>";
}

print "<center><strong><font face=verdana, Arial, Helvetica, sans-serif
color=#000000 size=2>";
print "<ISINDEX PROMPT='Informe o endereço para rota:  '>";
print "</font></strong></center>";
print "<br>";
print "<center>";
print "<a href='/adm/diagnostico.html'><img
src='/adm/imagens/botao_voltar.gif' border='0'></a></center>";

At, Wagner Nascimento.


Mais detalhes sobre a lista de discussão caiu