diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php index e4cf99609a..09a683fe18 100755 --- a/usr/local/www/diag_logs_filter.php +++ b/usr/local/www/diag_logs_filter.php @@ -46,6 +46,20 @@ require("guiconfig.inc"); require_once("filter_log.inc"); +# --- AJAX RESOLVE --- +if (isset($_POST['resolve'])) { + $ip = strtolower($_POST['resolve']); + $res = (is_ipaddr($ip) ? gethostbyaddr($ip) : ''); + + if ($res && $res != $ip) + $response = array('resolve_ip' => $ip, 'resolve_text' => $res); + else + $response = array('resolve_ip' => $ip, 'resolve_text' => gettext("Cannot resolve")); + + echo json_encode(str_replace("\\","\\\\", $response)); // single escape chars can break JSON decode + exit; +} + function getGETPOSTsettingvalue($settingname, $default) { $settingvalue = $default; @@ -351,25 +365,21 @@ include("head.inc"); } $srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto); + $src_htmlclass = str_replace('.', '-', $filterent['srcip']); $dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto); + $dst_htmlclass = str_replace('.', '-', $filterent['dstip']); ?> - &dialog_output=true', outputrule);" title=""> - Icon Reverse Resolve with DNS - "> - Icon Reverse Resolve with DNS + ');" title="" class="ICON-" border="0" src="/themes//images/icons/icon_log.gif" alt="Icon Reverse Resolve with DNS"/> " title="" onclick="return confirm('')"> Icon Easy Rule: Add to Block List - + ';?> - &dialog_output=true', outputrule);" title=""> - Icon Reverse Resolve with DNS - "> - Icon Reverse Resolve with DNS + ');" title="" class="ICON-" border="0" src="/themes//images/icons/icon_log.gif" alt="Icon Reverse Resolve with DNS"/> " title="" onclick="return confirm('')"> Icon Easy Rule: Pass this traffic - + ';?> TCP Flags: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, W - CWR

+ + + +