summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/diag_dns.php5
-rwxr-xr-xusr/local/www/diag_ping.php13
-rwxr-xr-xusr/local/www/diag_traceroute.php16
3 files changed, 19 insertions, 15 deletions
diff --git a/usr/local/www/diag_dns.php b/usr/local/www/diag_dns.php
index df6bbeb..fe0c888 100644
--- a/usr/local/www/diag_dns.php
+++ b/usr/local/www/diag_dns.php
@@ -150,7 +150,10 @@ include("head.inc"); ?>
<tr>
<td width="22%" valign="top" class="vncell">More Information:</td>
<td width="78%" class="vtable">
- NOTE: These links are to external services, so their reliability cannot be guaranteed.<br/><br/>
+ <a target="_new" href ="/diag_ping.php?host=<?=$host?>&interface=wan&count=3">Ping</a> <br/>
+ <a target="_new" href ="/diag_traceroute.php?host=<?=$host?>&ttl=18">Traceroute</a>
+ <p/>
+ NOTE: The following links are to external services, so their reliability cannot be guaranteed.<br/><br/>
<a target="_new" href="http://private.dnsstuff.com/tools/whois.ch?ip=<?php echo $ipaddr; ?>">IP WHOIS @ DNS Stuff</a><br />
<a target="_new" href="http://private.dnsstuff.com/tools/ipall.ch?ip=<?php echo $ipaddr; ?>">IP Info @ DNS Stuff</a>
</td>
diff --git a/usr/local/www/diag_ping.php b/usr/local/www/diag_ping.php
index 0ce85e3..4d82e06 100755
--- a/usr/local/www/diag_ping.php
+++ b/usr/local/www/diag_ping.php
@@ -46,24 +46,24 @@ require("guiconfig.inc");
define('MAX_COUNT', 10);
define('DEFAULT_COUNT', 3);
-if ($_POST) {
+if ($_POST || $_REQUEST['host']) {
unset($input_errors);
unset($do_ping);
/* input validation */
$reqdfields = explode(" ", "host count");
$reqdfieldsn = explode(",", "Host,Count");
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
+ do_input_validation($_REQUEST, $reqdfields, $reqdfieldsn, &$input_errors);
- if (($_POST['count'] < 1) || ($_POST['count'] > MAX_COUNT)) {
+ if (($_REQUEST['count'] < 1) || ($_REQUEST['count'] > MAX_COUNT)) {
$input_errors[] = "Count must be between 1 and {MAX_COUNT}";
}
if (!$input_errors) {
$do_ping = true;
- $host = $_POST['host'];
- $interface = $_POST['interface'];
- $count = $_POST['count'];
+ $host = $_REQUEST['host'];
+ $interface = $_REQUEST['interface'];
+ $count = $_REQUEST['count'];
}
}
if (!isset($do_ping)) {
@@ -145,3 +145,4 @@ include("head.inc"); ?>
</tr>
</table>
<?php include("fend.inc"); ?>
+
diff --git a/usr/local/www/diag_traceroute.php b/usr/local/www/diag_traceroute.php
index 3530c60..ec18da0 100755
--- a/usr/local/www/diag_traceroute.php
+++ b/usr/local/www/diag_traceroute.php
@@ -53,23 +53,23 @@ include("head.inc");
define('MAX_TTL', 64);
define('DEFAULT_TTL', 18);
-if ($_POST) {
+if ($_POST || $_REQUEST['host']) {
unset($input_errors);
unset($do_traceroute);
/* input validation */
$reqdfields = explode(" ", "host ttl");
$reqdfieldsn = explode(",", "Host,ttl");
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
+ do_input_validation($_REQUEST, $reqdfields, $reqdfieldsn, &$input_errors);
- if (($_POST['ttl'] < 1) || ($_POST['ttl'] > MAX_TTL)) {
+ if (($_REQUEST['ttl'] < 1) || ($_REQUEST['ttl'] > MAX_TTL)) {
$input_errors[] = "Maximum number of hops must be between 1 and {MAX_TTL}";
}
if (!$input_errors) {
$do_traceroute = true;
- $host = $_POST['host'];
- $ttl = $_POST['ttl'];
+ $host = $_REQUEST['host'];
+ $ttl = $_REQUEST['ttl'];
}
}
@@ -80,7 +80,7 @@ if (!isset($do_traceroute)) {
}
?>
<?php if ($input_errors) print_input_errors($input_errors); ?>
- <form action="diag_traceroute.php" method="post" name="iform" id="iform">
+ <form action="diag_traceroute.php" method="get" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td colspan="2" valign="top" class="listtopic">Traceroute</td>
@@ -103,7 +103,7 @@ if (!isset($do_traceroute)) {
<tr>
<td width="22%" valign="top" class="vncellreq">Use ICMP</td>
<td width="78%" class="vtable">
- <input name="useicmp" type="checkbox"<?php if($_POST['useicmp']) echo " CHECKED"; ?>>
+ <input name="useicmp" type="checkbox"<?php if($_REQUEST['useicmp']) echo " CHECKED"; ?>>
</td>
</tr>
<tr>
@@ -120,7 +120,7 @@ if (!isset($do_traceroute)) {
echo("<br><strong>Traceroute output:</strong><br>");
echo('<pre>');
ob_end_flush();
- if($_POST['useicmp'])
+ if($_REQUEST['useicmp'])
$useicmp = "-I";
else
$useicmp = "";
OpenPOWER on IntegriCloud