mirror of
https://github.com/twisterarmy/twister-analytics-crawler.git
synced 2025-01-14 00:48:19 +00:00
33 lines
594 B
PHP
33 lines
594 B
PHP
<?php
|
|
|
|
class CurlTorProject extends Curl {
|
|
|
|
public function getExitNodes() {
|
|
|
|
$this->prepare('torbulkexitlist', 'GET');
|
|
|
|
if ($response = $this->execute(false)) {
|
|
|
|
$list = explode("\n", $response);
|
|
|
|
if (count($list)) {
|
|
|
|
$sanitized = [];
|
|
foreach ($list as $ip) {
|
|
|
|
$ip = $this->sanitize($ip);
|
|
|
|
if ($ip) {
|
|
$sanitized[] = $ip;
|
|
}
|
|
|
|
}
|
|
|
|
return $sanitized;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|