remove extra code

This commit is contained in:
D4708 2021-05-30 14:43:32 +03:00
parent 3ca148ec3e
commit 102bce359d

View File

@ -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);
$modelLog = new ModelLog(DB_DATABASE, DB_HOSTNAME, DB_PORT, DB_USERNAME, DB_PASSWORD);
$exitNodes = [];
// Get TOR registry
if ($torProjectExitNodes = $curlTorProject->getExitNodes()) {
foreach ($torProjectExitNodes as $exitNode) {
$exitNodes[] = $exitNode;
}
// Get IPs
foreach ($modelIp->getIps() as $ip) {
if (in_array($ip['address'], $exitNodes)) {
if (in_array($ip['address'], $torProjectExitNodes)) {
$modelIp->setIsTOR($ip['ipId']);
}
}