Alukard_X
Grand Guru
- Joined
- Oct 3, 2020
- Messages
- 484
PHP:
<?php
$headers = array();
$headers[] = 'Accept: application/json, text/plain, */*';
$headers[] = 'Content-Type: application/json;charset=UTF-8';
$results = "1"; // 3 * 100
require 'vendor/autoload.php';
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Pool;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response;
$client = new Client([
]);
$search = '';
function strContainsSubstr($haystack, $needle) {
return strpos($haystack, $needle) !== false;
}
for ($i = 0; $i < $results; $i++) {
$response = $client->request('GET', 'https://urlscan.io/api/v1/search/?q=filename:youradexchange.com\/script\/' . $search, ['headers' => $headers,'http_errors' => false]);
$scan = json_decode($response->getBody());
$search = "&search_after=" . implode(",", $scan->results[array_key_last($scan->results)]->sort);
foreach ($scan->results as $key) {
sleep(15);
$url = $key->result;
$response2 = $client->request('GET', "$url", ['headers' => $headers,'http_errors' => false]);
$response2 = json_decode($response2->getBody());
foreach ($response2->lists->urls as $key2) {
if (
strContainsSubstr($key2, 'https://youradexchange.com/script/') ) {
parse_str(parse_url($key2, PHP_URL_QUERY), $params);
$path = parse_url($key2, PHP_URL_PATH);
$path = str_replace('/', '', $path);
$path = str_replace('.php', '', $path);
$path = str_replace('script', '', $path);
$path = str_replace('suurl5', 'onclick', $path);
if ($path != 'i') {
$final_result = $key->task->apexDomain . ';' . $path . ';' . $params['r'] . "\n";
file_put_contents('adcash_zones.csv', $final_result, FILE_APPEND | LOCK_EX);
}
}
}
}
}