Exemplo n.º 1
0
    $content['oracle_query'] = $_GET['query'];
} else {
    $content['oracle_query'] = "";
}
if (isset($_GET['uid'])) {
    $content['uid_current'] = $_GET['uid'];
} else {
    $content['uid_current'] = "-1";
}
// Init
// --- BEGIN Custom Code
// Set readable type
if ($content['oracle_type'] == "ip") {
    $content['oracle_type_readable'] = "ip";
    $content['oracle_kb_type'] = "ip";
    if (IsInternalIP($content['oracle_query'])) {
        $content['showonlinesearches'] = false;
    } else {
        $content['showonlinesearches'] = true;
    }
} else {
    if ($content['oracle_type'] == "domain") {
        $content['oracle_type_readable'] = "domain";
        $content['oracle_kb_type'] = "name";
        $content['showonlinesearches'] = true;
    } else {
        if ($content['oracle_type'] == "searchstr") {
            $content['oracle_type_readable'] = "custom search";
            $content['oracle_kb_type'] = "misc";
            $content['showonlinesearches'] = false;
        } else {
function InsertLookupLink($szIP, $szDomain, $prepend, $append)
{
    global $content, $uID;
    // Create string
    $szReturn = $prepend;
    // Set IUD property if available
    if (isset($uID)) {
        $includeLinkUID = "&uid=" . $uID;
    } else {
        $includeLinkUID = "";
    }
    // check if it is an IP or domain
    if (strlen($szIP) > 0) {
        /*		// Split IP into array
        		$IPArray = explode(".", $szIP);
        		if ( 
        				(intval($IPArray[0]) == 10	) ||
        				(intval($IPArray[0]) == 127 ) ||
        				(intval($IPArray[0]) == 172 && intval($IPArray[1]) >= 16 && intval($IPArray[1]) <= 31) || 
        				(intval($IPArray[0]) == 192	&& intval($IPArray[1]) == 168) ||
        				(intval($IPArray[0]) == 255	)
        			)
        */
        if (IsInternalIP($szIP)) {
            // Do not create a LINK in this case!
            $szReturn .= '<b>' . $szIP . '</b>';
        } else {
            // Normal LINK!
            $szReturn .= '<a href="http://kb.monitorware.com/kbsearch.php?sa=whois&oid=ip&origin=phplogcon&q=' . $szIP . '" target="_top" class="contextlink">' . $szIP . '</a>';
        }
        // Add InfoSearch Link
        $szReturn .= '<a href="asktheoracle.php?type=ip&query=' . $szIP . $includeLinkUID . '" target="_top"><img src="' . $content['MENU_HELP_BLUE'] . '" width="16" height="16" title="' . $content['LN_GEN_MOREINFORMATION'] . '"></a>';
    } else {
        if (strlen($szDomain) > 0) {
            $szReturn .= '<a href="http://kb.monitorware.com/kbsearch.php?sa=whois&oid=name&origin=phplogcon&q=' . $szDomain . '" target="_top" class="contextlink">' . $szDomain . '</a>';
            // Add InfoSearch Link
            $szReturn .= '<a href="asktheoracle.php?type=domain&query=' . $szDomain . $includeLinkUID . '" target="_top"><img src="' . $content['MENU_HELP_BLUE'] . '" width="16" height="16" title="' . $content['LN_GEN_MOREINFORMATION'] . '"></a>';
        }
    }
    // Append the append string now
    $szReturn .= $append;
    // return result
    return $szReturn;
}
Exemplo n.º 3
0
function InsertLookupLinkIP($matches)
{
    global $content, $uID;
    $szIP = $matches[1] . "." . $matches[2] . "." . $matches[3] . "." . $matches[4];
    $prepend = "";
    $append = "";
    // Create string
    $szReturn = $prepend;
    // Set IUD property if available
    if (isset($uID)) {
        $includeLinkUID = "&uid=" . $uID;
    } else {
        $includeLinkUID = "";
    }
    if (IsInternalIP($szIP)) {
        // Do not create a LINK in this case!
        $szReturn .= '<b>' . $szIP . '</b>';
    } else {
        // Normal LINK!
        $szReturn .= '<a href="http://kb.monitorware.com/kbsearch.php?sa=whois&oid=ip&origin=phplogcon&q=' . $szIP . '" target="_top" class="contextlink">' . $szIP . '</a>';
    }
    // Add InfoSearch Link
    $szReturn .= '<a href="asktheoracle.php?type=ip&query=' . $szIP . $includeLinkUID . '" target="_top"><img src="' . $content['MENU_HELP_BLUE'] . '" width="16" height="16" title="' . $content['LN_GEN_MOREINFORMATION'] . '"></a>';
    // Append the append string now
    $szReturn .= $append;
    // return result
    return $szReturn;
}