1

Are there any opensource web-application tools like http://network-tools.com/ ?

I want to perform DIG, traceroute, ping, telnet, whois etc.

1 Answer 1

1

This is a little something I whipped up for my own evil purposes that does most of that you're looking at doing. It's not as flashy as network-tools.com, but it get's the job done. It's written 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>

Modify as necessary, etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .