mirror of
https://github.com/twisterarmy/twister-analytics-crawler.git
synced 2025-01-30 16:34:18 +00:00
remove extra code
This commit is contained in:
parent
3ca148ec3e
commit
102bce359d
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);
|
||||
$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']);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user