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 ibXfI; BRhQ1: $check = (new Bot())->find("\x74\x6f\x6b\145\156\75\x3a\164\157..

Decoded Output download

<?php 
 goto ibXfI; BRhQ1: $check = (new Bot())->find("token=:token", "token={$req->token}")->fetch(); goto X5pIo; gmeq4: require_once __DIR__ . "/../../../../sys/Class/core/Telegram.php"; goto kgMcK; OA0uK: $telegram = new Telegram($req->token); goto BRhQ1; e1UEt: if (empty($req)) { echo json_encode(array("success" => false, "message" => "Ocorreu um erro.")); die; } goto OA0uK; bVy2O: require __DIR__ . "/../../../../sys/protect.php"; goto gmeq4; kgMcK: $req = json_decode(file_get_contents("php://input")); goto e1UEt; ibXfI: require __DIR__ . "/../../../../vendor/autoload.php"; goto bVy2O; X5pIo: if (isset($check)) { echo json_encode(array("success" => false, "message" => "Este token j foi adicionado.")); die; } else { $request = $telegram->run("getMe"); $checkChat = $telegram->run("getChat", array("chat_id" => $req->channel)); if (!$checkChat->ok) { echo json_encode(array("success" => $checkChat->ok, "message" => $checkChat->description)); die; } $setWebhook = $telegram->run("setWebhook", array("url" => SITE["url"] . "/webhook/" . $req->token)); if (!$setWebhook->ok) { echo json_encode(array("success" => $sendWelcome->ok, "message" => $sendWelcome->description)); die; } $sendWelcome = $telegram->run("sendMessage", array("chat_id" => $checkChat->result->id, "text" => " Bot ativado com sucesso!")); if (!$sendWelcome->ok) { echo json_encode(array("success" => $sendWelcome->ok, "message" => $sendWelcome->description)); die; } $bot = new Bot(); $bot->token = $req->token; $bot->name = $request->result->first_name; $bot->username = $request->result->username; $bot->channel = $checkChat->result->id; $bot->channel_name = $checkChat->result->title; $bot->icon = $req->icon; if ($bot->save()) { echo json_encode(array("success" => $request->ok, "message" => isset($request->description) ? $request->description : "O seu bot foi adicionado com sucesso.")); } else { echo json_encode(array("success" => false, "message" => $bot->fail()->getMessage())); } } ?>

Did this file decode correctly?

Original Code

<?php
 goto ibXfI; BRhQ1: $check = (new Bot())->find("\x74\x6f\x6b\145\156\75\x3a\164\157\x6b\145\156", "\164\157\x6b\x65\156\75{$req->token}")->fetch(); goto X5pIo; gmeq4: require_once __DIR__ . "\x2f\x2e\56\57\56\x2e\57\x2e\56\57\x2e\x2e\x2f\x73\x79\x73\57\103\154\x61\163\163\x2f\143\157\x72\145\57\x54\145\x6c\x65\x67\162\141\x6d\56\x70\x68\160"; goto kgMcK; OA0uK: $telegram = new Telegram($req->token); goto BRhQ1; e1UEt: if (empty($req)) { echo json_encode(array("\163\x75\x63\143\x65\163\x73" => false, "\x6d\145\163\x73\141\147\x65" => "\117\143\157\162\162\x65\x75\40\165\x6d\x20\x65\162\x72\x6f\56")); die; } goto OA0uK; bVy2O: require __DIR__ . "\57\56\x2e\57\x2e\56\x2f\56\x2e\57\56\56\x2f\163\x79\x73\57\160\162\157\x74\x65\143\x74\56\160\150\160"; goto gmeq4; kgMcK: $req = json_decode(file_get_contents("\x70\150\x70\x3a\57\x2f\151\x6e\x70\x75\164")); goto e1UEt; ibXfI: require __DIR__ . "\x2f\56\x2e\x2f\56\56\57\x2e\56\x2f\x2e\56\57\x76\x65\x6e\x64\157\162\x2f\141\165\x74\157\x6c\x6f\x61\x64\x2e\x70\150\160"; goto bVy2O; X5pIo: if (isset($check)) { echo json_encode(array("\163\165\x63\x63\x65\x73\163" => false, "\x6d\145\x73\163\141\147\x65" => "\x45\x73\164\145\40\164\157\x6b\x65\x6e\x20\152\303\xa1\40\146\157\x69\x20\x61\144\x69\x63\151\x6f\x6e\x61\144\157\56")); die; } else { $request = $telegram->run("\x67\145\x74\115\145"); $checkChat = $telegram->run("\x67\145\x74\103\150\x61\x74", array("\143\x68\141\x74\x5f\x69\x64" => $req->channel)); if (!$checkChat->ok) { echo json_encode(array("\x73\x75\x63\143\145\x73\x73" => $checkChat->ok, "\155\x65\163\163\x61\x67\x65" => $checkChat->description)); die; } $setWebhook = $telegram->run("\163\145\164\127\145\142\150\157\157\x6b", array("\165\x72\x6c" => SITE["\x75\162\x6c"] . "\57\x77\x65\x62\x68\157\x6f\153\57" . $req->token)); if (!$setWebhook->ok) { echo json_encode(array("\163\x75\x63\x63\145\163\x73" => $sendWelcome->ok, "\155\x65\x73\x73\141\147\x65" => $sendWelcome->description)); die; } $sendWelcome = $telegram->run("\x73\145\156\144\x4d\145\163\163\141\147\x65", array("\143\x68\x61\x74\x5f\x69\x64" => $checkChat->result->id, "\164\x65\170\164" => "\xe2\x9c\x85\40\102\157\164\40\x61\x74\151\x76\x61\x64\x6f\40\143\157\x6d\40\x73\x75\143\x65\163\163\x6f\x21")); if (!$sendWelcome->ok) { echo json_encode(array("\163\165\143\x63\x65\x73\x73" => $sendWelcome->ok, "\155\x65\163\x73\141\x67\x65" => $sendWelcome->description)); die; } $bot = new Bot(); $bot->token = $req->token; $bot->name = $request->result->first_name; $bot->username = $request->result->username; $bot->channel = $checkChat->result->id; $bot->channel_name = $checkChat->result->title; $bot->icon = $req->icon; if ($bot->save()) { echo json_encode(array("\x73\x75\x63\143\x65\163\163" => $request->ok, "\x6d\145\x73\163\141\147\145" => isset($request->description) ? $request->description : "\117\40\x73\x65\165\40\142\157\164\x20\146\157\151\x20\x61\x64\151\143\x69\157\156\141\144\157\x20\x63\x6f\x6d\x20\163\165\143\x65\x73\163\157\56")); } else { echo json_encode(array("\163\x75\143\x63\x65\163\x73" => false, "\x6d\145\x73\x73\141\147\x65" => $bot->fail()->getMessage())); } }

Function Calls

None

Variables

None

Stats

MD5 56bd617b9c125758ad9a4e0b13241fbd
Eval Count 0
Decode Time 33 ms