Browse Source

remove extra code

main
D4708 4 years ago
parent
commit
102bce359d
  1. 8
      tor.php

8
tor.php

@ -14,19 +14,13 @@ $curlTorProject = new CurlTorProject(TORPROJECT_PROTOCOL, TORPROJECT_HOST, TORPR
$modelIp = new ModelIp(DB_DATABASE, DB_HOSTNAME, DB_PORT, DB_USERNAME, DB_PASSWORD); $modelIp = new ModelIp(DB_DATABASE, DB_HOSTNAME, DB_PORT, DB_USERNAME, DB_PASSWORD);
$modelLog = new ModelLog(DB_DATABASE, DB_HOSTNAME, DB_PORT, DB_USERNAME, DB_PASSWORD); $modelLog = new ModelLog(DB_DATABASE, DB_HOSTNAME, DB_PORT, DB_USERNAME, DB_PASSWORD);
$exitNodes = [];
// Get TOR registry // Get TOR registry
if ($torProjectExitNodes = $curlTorProject->getExitNodes()) { if ($torProjectExitNodes = $curlTorProject->getExitNodes()) {
foreach ($torProjectExitNodes as $exitNode) {
$exitNodes[] = $exitNode;
}
// Get IPs // Get IPs
foreach ($modelIp->getIps() as $ip) { foreach ($modelIp->getIps() as $ip) {
if (in_array($ip['address'], $exitNodes)) { if (in_array($ip['address'], $torProjectExitNodes)) {
$modelIp->setIsTOR($ip['ipId']); $modelIp->setIsTOR($ip['ipId']);
} }
} }

Loading…
Cancel
Save