OpenSource NetworkTools Application

1

Há alguma ferramenta de aplicativo da web de código aberto, como o link ?

Eu quero realizar DIG, traceroute, ping, telnet, whois, etc.

    
por Rubi Naaz 03.10.2011 / 09:36

1 resposta

1

Esta é uma pequena coisa que eu preparei para os meus propósitos malignos que faz a maior parte do que você está procurando fazer. Não é tão chamativo quanto o network-tools.com, mas é o trabalho feito. Está escrito PHP:

<?php
/*
    Network Toolbox:
    This script runs various Linux-based command line utilities against a
    given domain name and returns the results of those programs.
    Copyright (C) 2011 Justin Pearce ([email protected])

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
?>
<html>
<head>
<title>
Network Toolbox on: <?php echo $_SERVER['HTTP_HOST'];?>
</title>
<script type="text/javascript">
function doQuerySet(){
   document.getElementById("resultset").innerHTML="";
   document.getElementById("resultset").innerHTML="Querying...please stand by...";
}
</script>
<style>
body{
  font-family: Arial, Tahoma, Verdana, sans-serif;
  font-size: 12px;
  color: #000000;
  background-color: #FFFFFF;
}
</style>
</head>
<body>
<h1>Network Toolbox</h1>
Enter the domain name or IP address you wish to query, select the deisred operation(s) and click "Query".<br>
(Please allow some time for the operations to complete)<br>
<form method="post">
<input type="text" name="domain" value="<?php if(isset($_REQUEST['domain'])){echo $_REQUEST['domain']; } ?>" onClick="this.select();"/>
   
<input type="submit" name="submit" value="Query" onclick="doQuerySet();"/>
<table>
<tr>
<td><input type="checkbox" name="ping" value="1" <?php echo (isset($_REQUEST['ping']))?'checked':''; ?> /> Ping</td>
<td><input type="checkbox" name="trace" value="1" <?php echo (isset($_REQUEST['trace']))?'checked':''; ?> /> Trace</td>
<td><input type="checkbox" name="whois" value="1" <?php echo (isset($_REQUEST['whois']))?'checked':''; ?> /> Whois</td>
<td><input type="checkbox" name="query" value="1" <?php echo (isset($_REQUEST['query']))?'checked':''; ?> /> Domain Query</td>
</tr>
</table>
</form>
<div id="resultset">
<?php
if(isset($_REQUEST['submit'])){
$domain = $_REQUEST['domain'];
$domain = str_replace('&', '', $domain);
$domain = str_replace('|', '', $domain);
$domain = str_replace('>', '', $domain);
$domain = str_replace('<', '', $domain);
$domain = str_replace('http://', '', $domain);
$domain = str_replace('/', '', $domain);
$output="<h2>Results for ".$domain."</h2>\n\n";
if(isset($_REQUEST['domain'])){
 if(isset($_REQUEST['ping']))
   $output .= "<b>Ping results</b>:"."\n".shell_exec("ping -c10 ".$domain)."\n";
if(isset($_REQUEST['trace']))
   $output .= "<b>Trace results:</b>"."\n".shell_exec("traceroute ".$domain)."\n";
if(isset($_REQUEST['whois']))
   $output .= "<b>WHOIS results:</b>"."\n".shell_exec("whois ".$domain)."\n";
if(isset($_REQUEST['query'])){
   $output .= "<b>DIG results:</b>"."\n".shell_exec("dig any ".$domain)."\n";
   $output .= "<b>NSLookup Results:</b>"."\n".shell_exec("nslookup -class=ANY -querytype=ANY ".$domain)."\n";
   $output .= "<b>Host results:</b>"."\n".shell_exec("host -a ".$domain)."\n";}
   $output = nl2br($output);
   echo $output;
}
}
?>
</div>
</body>
</html>

Modifique conforme necessário, etc.

    
por 03.10.2011 / 21:00