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 require_once __DIR__ . "\x2f\x52\x65\x70\154\141\x63\145\x4d\x65\x73\x73\141\x67\1..

Decoded Output download

<?php 
 require_once __DIR__ . "/ReplaceMessages.php"; class ReplyCommands extends Geral { private $object; private $phrase; public function __construct(string $token, string $command, object $object) { $this->object = $object; $this->phrase = new ReplaceMessages(); if (empty($token)) { throw new Exception("Token is missing"); } parent::__setToken($token); $bot_command = substr($command, 1, strlen($command)); if (method_exists($this, $bot_command)) { return $this->{$bot_command}(); } } public function start() { $oldmessages = (new OldMessage())->find("user_id=:uid", "uid=" . $this->object->message->from->id)->fetch(true); if (isset($oldmessages)) { foreach ($oldmessages as $old) { $this->run("deleteMessage", array("chat_id" => $old->user_id, "message_id" => $old->message_id)); $old->destroy(); } } $accounts = (new Purchase())->find("user_id=:user AND status=:status", "user={$this->object->message->from->id}&status=3")->fetch(true); $servers = (new Server())->find()->fetch(true); $buy = "buy"; if (isset($servers) && count($servers) == 1) { $buy = "server_id=" . $servers[0]->id . "uniq_server"; } if (isset($accounts)) { $buttons = array(array(array("text" => $this->phrase->findPhrase("start_buttons", "buy_account"), "callback_data" => $buy)), array(array("text" => $this->phrase->findPhrase("start_buttons", "my_accounts"), "callback_data" => "my_accounts"))); if ($this->phrase->findPhrase("start_buttons", "clients_group_link")) { $buttons[] = array(array("text" => $this->phrase->findPhrase("start_buttons", "clients_group"), "url" => $this->phrase->findPhrase("start_buttons", "clients_group_link"))); } } else { $buttons = array(array(array("text" => $this->phrase->findPhrase("start_buttons", "buy_account"), "callback_data" => $buy))); } if ($this->phrase->findPhrase("start_buttons", "download_app") != null) { $buttons += array(array("text" => $this->phrase->findPhrase("start_buttons", "download_app"), "url" => $this->phrase->findPhrase("start_buttons", "download_app_link"))); } $this->run("sendMessage", array("chat_id" => $this->object->message->from->id, "reply_to_message_id" => $this->object->message->message_id, "text" => $this->updateMessageVars($this->phrase->findPhrase("start")), "reply_markup" => json_encode(array("inline_keyboard" => $buttons)))); } private function updateMessageVars(string $text) { return str_replace(array("USER_NAME", "USER_LASTNAME"), array($this->object->message->from->first_name, $this->object->message->from->last_name), $text); } } ?>

Did this file decode correctly?

Original Code

<?php
 require_once __DIR__ . "\x2f\x52\x65\x70\154\141\x63\145\x4d\x65\x73\x73\141\x67\145\163\56\x70\150\160"; class ReplyCommands extends Geral { private $object; private $phrase; public function __construct(string $token, string $command, object $object) { $this->object = $object; $this->phrase = new ReplaceMessages(); if (empty($token)) { throw new Exception("\124\x6f\x6b\x65\x6e\40\x69\x73\x20\155\x69\x73\163\x69\x6e\x67"); } parent::__setToken($token); $bot_command = substr($command, 1, strlen($command)); if (method_exists($this, $bot_command)) { return $this->{$bot_command}(); } } public function start() { $oldmessages = (new OldMessage())->find("\165\x73\145\162\137\x69\x64\75\x3a\x75\151\144", "\165\x69\x64\x3d" . $this->object->message->from->id)->fetch(true); if (isset($oldmessages)) { foreach ($oldmessages as $old) { $this->run("\x64\145\x6c\x65\164\145\115\145\x73\x73\141\147\x65", array("\143\x68\141\x74\x5f\x69\x64" => $old->user_id, "\155\145\x73\x73\141\147\x65\x5f\151\x64" => $old->message_id)); $old->destroy(); } } $accounts = (new Purchase())->find("\165\x73\x65\x72\137\151\x64\x3d\72\x75\x73\145\x72\x20\101\x4e\x44\x20\x73\x74\141\164\165\x73\75\x3a\x73\x74\141\x74\165\x73", "\165\x73\x65\162\75{$this->object->message->from->id}\x26\163\x74\x61\x74\x75\163\x3d\63")->fetch(true); $servers = (new Server())->find()->fetch(true); $buy = "\142\x75\x79"; if (isset($servers) && count($servers) == 1) { $buy = "\163\x65\x72\166\x65\x72\137\151\144\x3d" . $servers[0]->id . "\x75\156\x69\x71\x5f\x73\145\162\x76\145\162"; } if (isset($accounts)) { $buttons = array(array(array("\164\x65\x78\164" => $this->phrase->findPhrase("\x73\164\141\162\x74\x5f\142\165\164\x74\157\156\163", "\x62\x75\x79\x5f\x61\143\143\157\165\x6e\x74"), "\x63\141\154\x6c\x62\x61\143\153\137\x64\141\x74\141" => $buy)), array(array("\164\x65\x78\x74" => $this->phrase->findPhrase("\163\164\x61\x72\164\x5f\x62\165\x74\164\157\156\x73", "\155\x79\137\x61\x63\143\157\x75\x6e\x74\x73"), "\x63\141\154\x6c\x62\141\x63\x6b\x5f\x64\141\x74\x61" => "\x6d\171\137\x61\143\143\157\165\156\x74\x73"))); if ($this->phrase->findPhrase("\x73\164\x61\x72\164\x5f\x62\165\164\x74\x6f\156\x73", "\143\154\x69\x65\x6e\164\163\137\x67\162\157\165\x70\x5f\154\151\x6e\153")) { $buttons[] = array(array("\164\x65\x78\x74" => $this->phrase->findPhrase("\x73\164\141\162\164\137\142\165\164\164\157\156\163", "\143\x6c\x69\145\x6e\164\163\137\147\x72\x6f\x75\x70"), "\x75\162\x6c" => $this->phrase->findPhrase("\163\164\141\162\x74\137\142\165\x74\x74\157\x6e\x73", "\143\x6c\151\145\156\x74\x73\137\147\x72\157\x75\160\x5f\x6c\151\x6e\153"))); } } else { $buttons = array(array(array("\164\145\x78\164" => $this->phrase->findPhrase("\163\x74\141\x72\164\137\x62\x75\164\x74\157\x6e\163", "\142\165\171\x5f\x61\x63\x63\x6f\x75\156\164"), "\143\141\x6c\154\142\141\x63\x6b\137\144\x61\x74\x61" => $buy))); } if ($this->phrase->findPhrase("\x73\164\x61\x72\x74\137\x62\165\164\164\x6f\x6e\163", "\144\157\167\156\154\x6f\x61\x64\137\141\x70\160") != null) { $buttons += array(array("\164\x65\170\164" => $this->phrase->findPhrase("\163\164\141\162\164\x5f\142\x75\x74\x74\157\156\163", "\144\x6f\x77\156\x6c\157\141\x64\137\x61\x70\x70"), "\x75\x72\154" => $this->phrase->findPhrase("\163\x74\141\162\164\137\142\165\x74\x74\x6f\156\x73", "\x64\157\167\x6e\154\x6f\141\x64\137\141\160\x70\x5f\154\x69\x6e\x6b"))); } $this->run("\x73\145\x6e\x64\x4d\145\163\x73\141\x67\x65", array("\x63\150\x61\x74\x5f\151\x64" => $this->object->message->from->id, "\162\x65\160\154\x79\137\x74\x6f\137\x6d\145\x73\163\141\147\x65\137\x69\x64" => $this->object->message->message_id, "\x74\x65\170\164" => $this->updateMessageVars($this->phrase->findPhrase("\x73\x74\x61\x72\164")), "\x72\x65\x70\154\171\x5f\155\141\162\x6b\165\x70" => json_encode(array("\x69\x6e\x6c\x69\x6e\x65\137\x6b\x65\171\x62\157\141\x72\144" => $buttons)))); } private function updateMessageVars(string $text) { return str_replace(array("\x55\x53\105\122\137\116\101\115\105", "\125\x53\x45\x52\137\114\x41\x53\124\x4e\101\x4d\105"), array($this->object->message->from->first_name, $this->object->message->from->last_name), $text); } }

Function Calls

None

Variables

None

Stats

MD5 ccdcb1eaab46bfc5da3161f67a968cd3
Eval Count 0
Decode Time 39 ms