diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-07-30 20:57:48 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-07-30 20:57:48 -0400 |
commit | a812abb3b7dac9c0e065f1cbd5a2eda86f73dcbc (patch) | |
tree | acc411b51adc4714b5e7bb8bbe2929b4bc013048 /usr/local | |
parent | 96e04209efea9c583b8059b5a6c4ad74c9b42ab9 (diff) | |
download | pfsense-a812abb3b7dac9c0e065f1cbd5a2eda86f73dcbc.zip pfsense-a812abb3b7dac9c0e065f1cbd5a2eda86f73dcbc.tar.gz |
Teach the DNS Lookup util to grok multiple host entries
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/diag_dns.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/usr/local/www/diag_dns.php b/usr/local/www/diag_dns.php index d1392d3..94cd630 100644 --- a/usr/local/www/diag_dns.php +++ b/usr/local/www/diag_dns.php @@ -82,6 +82,8 @@ if ($_POST) { } elseif (is_hostname($host)) { $type = "hostname"; $resolved = gethostbyname($host); + $dig=`dig www.cnn.com A | grep "www.cnn.com" | grep -v ";" | awk '{ print $5 }'`; + $resolved = split("\n", $dig); $hostname = $host; if ($host != $resolved) $ipaddr = $resolved; @@ -108,10 +110,26 @@ include("head.inc"); ?> <tr> <td width="22%" valign="top" class="vncellreq"><?=gettext("Hostname or IP");?></td> <td width="78%" class="vtable"> - <?=$mandfldhtml;?><input name="host" type="text" class="formfld" id="host" size="20" value="<?=htmlspecialchars($host);?>"> + <?=$mandfldhtml;?> + <table> + <tr><td valign="top"> + <input name="host" type="text" class="formfld" id="host" size="20" value="<?=htmlspecialchars($host);?>"> + </td> + <td> <? if ($resolved && $type) { ?> - = <font size="+1"><?php echo $resolved; ?><font size="-1>"> + = <font size="+1"> +<?php + if(is_array($resolved)) { + foreach($resolved as $hostitem) { + echo $hostitem . "<br/>"; + } + } else { + echo $resolved; + } +?> + <font size="-1>"> <? } ?> + </td></tr></table> </td> </tr> <?php if($_POST): ?> |