File: /var/www/www-root/data/www/greeen.click/gsb5.php
<?php
// Google API token
const API_TOKEN = 'AIzaSyBSpNk8dc3_INYEJFq8-uz86p7BObyPX2Q';
// Client id
const CLIENT_ID = 'GSB';
// Telegram user id
const TELEGRAM_ID = 226511049;
// Telegram token
const TELEGRAM_TOKEN = '6536131783:AAHbrRljo60HiU0trxLtDpTtDIh31VDDFjY';
// Ссылки для проверки
const URLS = [
'http://vvgrn.afftrk06.com/?utm_source=63df7d66677dcf78&s1=21439&s2=231610&s3=dating-roller&s5=[LANG]',
'https://aqopx.fastrtbads.com/?pl=AjnOBdY-b0ic7hBHQiUYBw',
'https://hotbcoyavi.today',
'frxvisionzk.today',
'frxsearchitk.today',
'rpxsolutionxtd.com',
'https://aqopx.fastrtbads.com/?pl=3b-EI2C0x0mGvvYoRGfQug',
'https://mopa.today/KAKqwVMZ864=?',
'https://automoon.click',
'https://wowik.click',
'https://mowik.click',
'https://www.imftrk17.com/,
'https://clickfagan.info/preview/new?utm_campaign=2779&utm_content=2cc4dcfa-70ad-4acf-8d9e-8197b66cb99a&utm_source=[SID]&utm_medium=1153&is_visitor=1',
];
$post = [
'client' => [
'clientId' => CLIENT_ID,
'clientVersion' => '1.5.2'
],
'threatInfo' => [
'threatTypes' => ['MALWARE', 'SOCIAL_ENGINEERING'],
'platformTypes' => ['WINDOWS'],
'threatEntryTypes' => ['URL'],
'threatEntries' => []
]
];
foreach (URLS as $url) {
$post['threatInfo']['threatEntries'][] = ['url' => $url];
}
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://safebrowsing.googleapis.com/v4/threatMatches:find?key=' . API_TOKEN,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode($post),
CURLOPT_HTTPHEADER => [
'cache-control: no-cache',
'content-type: application/json',
'postman-token: b05b8d34-85f2-49cf-0f8e-03686a71e4e9'
],
]);
$response = curl_exec($curl);
$error = curl_error($curl);
curl_close($curl);
if ($error) {
echo 'cURL error:' . PHP_EOL . $error . PHP_EOL;
} else if (!empty($response)) {
$response = json_decode($response, true);
if (!empty($response['error'])) {
echo 'Code: ' . $response['error']['code'] . PHP_EOL .
'Message: ' . $response['error']['message'] . PHP_EOL;
} else if (!empty($response['matches'])) {
$errorUrls = [];
foreach ($response['matches'] as $match) {
if (!empty($match['threat']['url'])) {
$errorUrls[] = $match['threat']['url'];
}
}
if (!empty($errorUrls)) {
$message = '<strong>Google Safe Browsing</strong>' . PHP_EOL . PHP_EOL .
'<u>Error urls:</u>' . PHP_EOL .
implode(PHP_EOL, $errorUrls);
file_get_contents('https://api.telegram.org/bot' . TELEGRAM_TOKEN . '/sendMessage?chat_id=' . TELEGRAM_ID . '&parse_mode=HTML&text=' . urlencode($message));
}
}
}
echo PHP_EOL . 'Done' . PHP_EOL;