<?php

require_once "/usr/local/apache/ProxyFramework/DatabaseImpl.php";
$files = scandir("/usr/local/apache/ProxyFramework/");
$ports = new DatabaseImpl("/usr/local/apache/htdocs/proxy_framework/ports.db", array(5, 10));
$ippdb = new DatabaseImpl("/usr/local/apache/htdocs/proxy_framework/ipport.db", array(15, 5));
$pcounts = array();
$ipport = array();
foreach ($files as $f) {
    if (strpos($f, "snapshot-") !== false) {
        print "processing file {$f}...\n";
        $db = new DatabaseImpl("/usr/local/apache/ProxyFramework/" . $f);
        $db->loadEntries($ent);
        foreach ($ent as $e) {
            if (!isset($pcounts[$e[1]])) {
                $pcounts[$e[1]] = 1;
                $ipport[$e[0]][$e[1]] = 1;
                $ipp[] = array($e[0], $e[1]);
            } else {
                if (!isset($ipport[$e[0]][$e[1]])) {
                    $ipport[$e[0]][$e[1]] = 1;
                    $ipp[] = array($e[0], $e[1]);
                    $pcounts[$e[1]]++;
                }
            }
        }
    }
}
$ps = array();
foreach ($pcounts as $k => $v) {
    $ps[] = array($k, $v);
示例#2
0
    }
}
$file = PF_DIR . "/" . $newfiles[count($newfiles) - 1];
$db = new DatabaseImpl($file);
if (count($_GET) > 0) {
    $results = array();
    for ($i = 0; $i < 8; $i++) {
        if (isset($_GET["key" . $i])) {
            eval('$res' . $i . ' = $db->searchEntries(SEARCH_FIELD_OFFSET | SEARCH_ARRAY | SEARCH_COMPARE, $i, ' . ($i == 4 ? '"<=".' : '') . '$_GET["key".$i]);');
        }
    }
    $filter = isset($res0) || isset($res1) || isset($res2) || isset($res3) || isset($res4) || isset($res5) || isset($res6) || isset($res7);
    if ($filter) {
        eval('$results = my_array_intersect($res0, $res1, $res2, $res3, $res4, $res5, $res6, $res7);');
        if (count($results) > 0) {
            $db->loadEntries($proxies, $results, null, null, $_GET[sortColumn], $_GET[sortOrder]);
        }
    }
}
if (!$filter) {
    $db->loadEntries($proxies, null, null, null, $_GET[sortColumn], $_GET[sortOrder]);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>proxy framework</title>
		<style type="text/css">
			td { font-family: Verdana; font-size: 10px; border: 1px #ff0000 solid; }
			.quarantined { background-color: #ff0000; } 
			.good { background-color: cyan; }