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 __DIR__ . "\x2f\56\56\x2f\x2e\x2e\57\56\x2e\x2f\x76\x65\156\x64\x6f\x72\x2..

Decoded Output download

<?php 
 require __DIR__ . "/../../../vendor/autoload.php"; require_once __DIR__ . "/../Models/Notification.php"; require_once __DIR__ . "/ReplaceMessages.php"; use phpseclib3\Net\SSH2; class ReplyCallback extends Geral { private $server_id; private $callback; private $token; private $notif; private $phrase; public function __construct($object, $token) { parent::__setToken($token); $this->token = $token; $this->callback = $object->callback_query; $this->phrase = new ReplaceMessages(); $this->notif = new Notification(); $this->run("answerCallbackQuery", array("callback_query_id" => $this->callback->id, "text" => "Aguarde...")); if (strpos($this->callback->data, "server_id=") !== false) { $this->server_id = preg_replace("/[^0-9]/", '', $this->callback->data); $server = (new Server())->findById($this->server_id); $price = "R$" . number_format($server->price_per_login, 2, ",", "."); $text = str_replace(array("SERVER_ID", "ACC_DURATION", "ACC_PRICE", "V2_ACC_FLAG", "ACC_FLAG", "\r\n"), array($this->server_id, $server->acc_duration, $price, $this::flag($server->icon, true), $this::flag($server->icon), PHP_EOL), $this->phrase->findPhrase("selected_server_message_text")); if (strpos($this->callback->data, "uniq_server") !== false) { $text = $text . PHP_EOL . PHP_EOL . "<i>\xe2\204\271 Servidor selecionado automaticamente.</i>"; } return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => $text, "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("selected_server", "buy"), "callback_data" => "sell_login=" . $this->server_id), array("text" => $this->phrase->findPhrase("selected_server", "generate_test"), "callback_data" => "teste:sid=" . $this->server_id)), array(array("text" => $this->phrase->findPhrase("selected_server", "select_other_server"), "callback_data" => "buy")), array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home"))))))); } if (strpos($this->callback->data, "sell_login=") !== false) { $this->server_id = str_replace("sell_login=", '', $this->callback->data); $server = (new Server())->findById($this->server_id); $price = "R$" . number_format($server->price_per_login, 2, ",", "."); return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => $this->phrase->findPhrase("selected_server_info"), "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => "Pagar " . $price, "callback_data" => "payment:server=" . $this->server_id)), array(array("text" => $this->phrase->findPhrase("selected_server", "server_info"), "callback_data" => "server_id=" . $this->server_id)), array(array("text" => $this->phrase->findPhrase("selected_server", "select_other_server"), "callback_data" => "buy")), array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home"))))))); } if (strpos($this->callback->data, "payment:server=") !== false) { $this->server_id = str_replace("payment:server=", '', $this->callback->data); $server = (new Server())->findById($this->server_id); $bot = (new Bot())->find("token=:token", "token={$this->token}")->fetch(); $adm = (new Administration())->findById(1); if (empty($adm)) { return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "O sistema deste bot ainda n\xc3\243o foi configurado.", "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home"))))))); } MercadoPago\SDK::setAccessToken($adm->accessToken); $preference = new MercadoPago\Preference(); $item = new MercadoPago\Item(); $item->title = "Login SSH - " . $bot->name; $item->quantity = 1; $item->unit_price = $server->price_per_login; $preference->items = array($item); $preference->external_reference = substr(sha1(time()), 0, 9) . "-" . substr(sha1($bot->id), 0, 7) . "-" . substr(sha1($server->price_per_login), 0, 8) . "-" . substr(sha1($server->id), 0, 9); $preference->notification_url = SITE["payment_notify"]; $preference->auto_return = "all"; $preference->back_urls = array("success" => "https://t.me/" . $bot->username, "pending" => "https://t.me/" . $bot->username, "failure" => "https://t.me/" . $bot->username); if ($preference->save()) { $purchase = new Purchase(); $purchase->bot_id = $bot->id; $purchase->user_id = $this->callback->from->id; $purchase->server_id = $this->server_id; $purchase->status = 0; $purchase->price = $item->unit_price; $purchase->external_reference = $preference->external_reference; if ($purchase->save()) { $oldmessage = new OldMessage(); $oldmessage->message_id = $this->callback->message->message_id; $oldmessage->user_id = $this->callback->from->id; $oldmessage->save(); return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "O seu link de pagamento foi gerado com sucesso, agora finalize o pagamento clicando no link abaixo", "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => "Pagar ", "url" => $preference->init_point))))))); } } $this->notif->text = "Atualize o seu token do Mercado pago, um problema foi encontrado ao gerar um link de pagamento."; $this->notif->save(); return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "Ocorreu um erro ao gerar o seu link de pagamento, por favor volte ao in\xc3\xadcio e tente novamente, se o problema persistir, entre em contato com o administrador do sistema para que o problema seja resolvido.", "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home"))))))); } if (strpos($this->callback->data, "generate_acc") !== false) { $query = str_replace("generate_acc:", '', $this->callback->data); parse_str($query, $parse); $payment = (new Purchase())->findById($parse["pay"]); if ($payment->status == 3) { return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "A sua conta j\xc3\xa1 foi gerada, voc\xc3\xaa pode verificar tocando no bot\xc3\xa3o abaixo", "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("start_buttons", "my_accounts"), "callback_data" => "my_accounts"))))))); } $server = (new Server())->findById($parse["server"]); $ssh = new SSH2($server->ip); if (!$ssh->login("root", $server->server_password)) { $this->notif->text = "Problema de autentica\303\xa7\303\243o no servidor {$this::flag($server->icon)} {$server->ip}."; $this->notif->save(); return $this->run("sendMessage", array("chat_id" => $this->callback->from->id, "text" => "\342\235\214 <i>N\xc3\xa3o foi poss\xc3\255vel autenticar no servidor, toque no bot\303\243o para tentar novamente.</i>")); } if (!$ssh->isAuthenticated()) { return $this->run("sendMessage", array("chat_id" => $this->callback->from->id, "text" => "\xe2\235\214 <i>N\303\xa3o foi poss\303\xadvel conectar ao servidor, tente novamente.</i>")); } if (!$ssh->isConnected()) { return $this->run("sendMessage", array("chat_id" => $this->callback->from->id, "text" => "\342\235\x8c <i>N\xc3\243o foi poss\xc3\255vel conectar ao servidor, tente novamente.</i>")); } $characters = "abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ1234567890"; $user_ssh = substr(str_shuffle($characters), 0, 7); $pass_ssh = rand(100000, 999999); $res = $ssh->exec("cd /etc/tbot && ./criarusuario.sh {$user_ssh} {$pass_ssh} {$server->acc_duration} 1 2> /dev/null"); if ($res == 13) { $sshpremium = new UserAccount(); $sshpremium->bot_id = $parse["bot"]; $sshpremium->server_id = $parse["server"]; $sshpremium->payment_id = $parse["pay"]; $sshpremium->user_id = $this->callback->from->id; $sshpremium->ssh_user = $user_ssh; $sshpremium->ssh_pass = $pass_ssh; if ($sshpremium->save()) { $payment->status = 3; $payment->save(); } else { $ssh->exec("cd /etc/tbot && ./remover.sh {$user_ssh} 2> /dev/null"); unset($ssh); $this->notif->text = "Falha na cria\xc3\xa7\xc3\243o de um usu\303\241rio no servidor {$this::flag($server->icon)} {$server->ip}"; $this->notif->save(); return $this->run("sendMessage", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "Ocorreu um erro ao gerar a sua conta, tente novamente em alguns segundos.")); } unset($ssh); return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "\xe2\234\x85 <b>A sua conta foi gerada com sucesso!</b>
\xa
\xaUsu\xc3\xa1rio: <code>{$user_ssh}</code>
Senha: <code>{$pass_ssh}</code>\xd\xa
\xa<i>Dica: toque no nome de usu\303\xa1rio e na senha para copi\xc3\241-los.</i>", "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("start_buttons", "my_accounts"), "callback_data" => "my_accounts")), array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home"))))))); } unset($ssh); $this->run("sendMessage", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "Ocorreu um erro ao gerar a sua conta, tente novamente em alguns segundos, se o erro persistir, entre em contato com o administrador do sistema.")); } if (strpos($this->callback->data, "teste") !== false) { if (empty($this->phrase->findPhrase("start_buttons", "download_app_link"))) { return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "Testes indispon\xc3\255veis enquanto o bot n\xc3\xa3o tem aplicativo configurado!", "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home"))))))); } $server_id = str_replace("teste:sid=", '', $this->callback->data); $server = (new Server())->findById($server_id); $now = strtotime("now"); $tests = (new Test())->find("from_user=:uid AND expiration > :exp", "uid={$this->callback->from->id}&exp={$now}")->limit(1)->order("id DESC")->fetch(); if (isset($tests)) { return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "Voc\xc3\252 j\303\xa1 gerou um teste, n\xc3\xa3o \303\xa9 poss\303\255vel gerar outro em menos de 30 dias.", "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home"))))))); } $ssh = new SSH2($server->ip); if (!$ssh->login("root", $server->server_password)) { return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "\342\x9d\214 <i>Ocorreu um erro ao gerar o seu teste, a autentica\303\247\303\243o no servidor falhou.</i>", "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home"))))))); } $user_ssh = substr(str_shuffle("abcdefghjkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"), 0, 6); $pass_ssh = rand(10000, 999999); $res = $ssh->exec("cd /etc/tbot && ./criarusuario.sh {$user_ssh} {$pass_ssh} 2 1 2> /dev/null"); if ($res != 13) { return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "\342\x9d\x8c <i>Ocorreu um erro ao gerar o seu teste, tente novamente.</i> {$res}", "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home"))))))); } $test = new Test(); $test->server_id = $server->id; $test->from_user = $this->callback->from->id; $test->user_ssh = $user_ssh; $test->pass_ssh = $pass_ssh; $test->expiration = strtotime("+ 30 day"); $test->save(); return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => "<b>O seu teste foi gerado com sucesso!</b>
\xa
\360\237\x91\244 <b>Usu\303\xa1rio:</b> {$user_ssh}\xd
\360\x9f\x94\221 <b>Senha:</b> {$pass_ssh}
\xa\xe2\x8f\xb3 <b>Dura\xc3\247\303\xa3o:</b> {$server->test_duration} minutos\xd

\xa<i>Toque no nome de usu\303\241rio e na senha para copiar, se voc\xc3\xaa se desfazer desta mensagem, o seu usu\303\241rio e senha de teste n\303\243o poder\303\xa1 ser recuperado depois.</i>", "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home")), array(array("text" => $this->phrase->findPhrase("start_buttons", "download_app"), "url" => $this->phrase->findPhrase("start_buttons", "download_app_link")))))))); } switch ($this->callback->data) { case "buy": $servers = (new Server())->find()->fetch(true); if (empty($servers)) { return $this->run("editMessageText", array("chat_id" => $this->callback->message->from->id, "message_id" => $this->callback->message->message_id, "text" => "<i>O administrador do bot ainda n\xc3\xa3o adicionou servidores.</i>")); } $buttons = array(); foreach ($servers as $server) { $name = preg_replace(array("/[.](\d{3})[.]/", "/[.](\w{4,})[.]/", "/([a-z]{3})[.]([a-z]{2,})/"), array(".***.", ".***.", "***.***"), strtolower($server->ip), 1); $buttons[] = array(array("text" => $this::flag($server->icon) . $name, "callback_data" => "server_id=" . $server->id)); } $buttons[] = array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home")); $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => MESSAGES["select_server"], "reply_markup" => json_encode(array("inline_keyboard" => $buttons)))); break; case "home": $oldmessages = (new OldMessage())->find("user_id=:uid", "uid=" . $this->callback->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->callback->from->id}&status=3")->fetch(true); $servers = (new Server())->find()->fetch(true); $buy = "buy"; if (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"))); } return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => $this->updateMessageVars($this->phrase->findPhrase("start")), "reply_markup" => json_encode(array("inline_keyboard" => $buttons)))); break; case "my_accounts": $accounts = (new UserAccount())->find("user_id=:uid", "uid={$this->callback->from->id}")->fetch(true); $text = "<b>Minhas Contas</b>"; foreach ($accounts as $acc) { $text .= "

\360\237\221\xa4 <b>Usu\303\xa1rio:</b> <code>{$acc->ssh_user}</code>\xd
\xf0\237\224\x91 <b>Senha:</b> <code>{$acc->ssh_pass}</code>\xd\xa\360\237\x93\206 <b>Criada em:</b> " . date("d/m/y", strtotime($acc->created_at) . PHP_EOL); } return $this->run("editMessageText", array("chat_id" => $this->callback->from->id, "message_id" => $this->callback->message->message_id, "text" => $text, "reply_markup" => json_encode(array("inline_keyboard" => array(array(array("text" => $this->phrase->findPhrase("home"), "callback_data" => "home"))))))); break; } } private static function flag(int $flag, $show_name = false) { switch ($flag) { case 1: return $show_name ? "\xf0\237\207\247\360\x9f\x87\267 Brasil" : "\xf0\237\x87\xa7\360\237\207\xb7 "; break; case 2: return $show_name ? "\360\237\x87\272\360\237\x87\270 Estados Unidos" : "\360\237\x87\xba\360\x9f\207\270 "; break; case 3: return $show_name ? "\360\237\x87\xa8\xf0\237\x87\xa6 Canad\303\241" : "\360\x9f\x87\xa8\360\237\207\246 "; break; case 4: return $show_name ? "\360\x9f\x87\257\360\237\207\xb5 Jap\303\243o" : "\360\237\x87\xaf\xf0\x9f\x87\xb5 "; break; case 5: return $show_name ? "\xf0\x9f\207\xab\xf0\237\207\267 Fran\xc3\xa7a" : "\360\237\207\xab\xf0\237\207\xb7 "; break; default: return $show_name ? "\xf0\x9f\207\247\360\x9f\207\267 Brasil" : "\360\x9f\x87\xa7\xf0\237\207\267 "; break; } } private function updateMessageVars(string $text) { return str_replace(array("USER_NAME", "USER_LASTNAME"), array($this->callback->from->first_name, $this->callback->from->last_name), $text); } } ?>

Did this file decode correctly?

Original Code

<?php
 require __DIR__ . "\x2f\56\56\x2f\x2e\x2e\57\56\x2e\x2f\x76\x65\156\x64\x6f\x72\x2f\x61\165\164\x6f\x6c\157\141\x64\x2e\160\x68\x70"; require_once __DIR__ . "\57\x2e\56\57\115\x6f\144\145\154\x73\x2f\x4e\x6f\x74\151\x66\x69\143\x61\164\151\157\156\x2e\x70\150\160"; require_once __DIR__ . "\57\122\x65\160\x6c\141\143\x65\x4d\145\163\x73\141\147\145\163\56\x70\150\x70"; use phpseclib3\Net\SSH2; class ReplyCallback extends Geral { private $server_id; private $callback; private $token; private $notif; private $phrase; public function __construct($object, $token) { parent::__setToken($token); $this->token = $token; $this->callback = $object->callback_query; $this->phrase = new ReplaceMessages(); $this->notif = new Notification(); $this->run("\141\x6e\x73\167\145\x72\x43\141\x6c\154\x62\x61\143\x6b\121\x75\145\x72\171", array("\x63\141\154\154\142\x61\143\x6b\137\x71\x75\x65\x72\171\x5f\151\144" => $this->callback->id, "\x74\145\x78\164" => "\x41\147\165\141\x72\144\145\56\x2e\56")); if (strpos($this->callback->data, "\163\x65\x72\x76\x65\x72\137\x69\x64\x3d") !== false) { $this->server_id = preg_replace("\57\133\136\60\x2d\x39\x5d\57", '', $this->callback->data); $server = (new Server())->findById($this->server_id); $price = "\122\44" . number_format($server->price_per_login, 2, "\x2c", "\56"); $text = str_replace(array("\123\105\x52\x56\x45\x52\137\111\104", "\x41\103\103\x5f\104\125\x52\101\x54\111\117\x4e", "\x41\103\x43\137\x50\122\x49\103\x45", "\126\x32\137\101\x43\103\137\x46\x4c\x41\x47", "\101\103\x43\x5f\106\x4c\x41\107", "\x5c\x72\134\156"), array($this->server_id, $server->acc_duration, $price, $this::flag($server->icon, true), $this::flag($server->icon), PHP_EOL), $this->phrase->findPhrase("\x73\145\154\x65\x63\x74\145\144\137\x73\145\x72\166\x65\x72\137\155\x65\x73\163\x61\147\145\137\164\x65\x78\x74")); if (strpos($this->callback->data, "\x75\156\151\x71\137\x73\145\x72\x76\x65\162") !== false) { $text = $text . PHP_EOL . PHP_EOL . "\74\x69\76\xe2\204\271\40\x53\145\x72\166\151\x64\157\162\40\163\145\154\145\143\151\157\156\x61\144\x6f\40\141\x75\164\157\x6d\x61\x74\x69\143\x61\155\145\156\164\x65\56\x3c\57\x69\x3e"; } return $this->run("\145\144\x69\x74\115\x65\x73\163\x61\147\145\124\x65\170\x74", array("\x63\150\141\164\137\151\144" => $this->callback->from->id, "\155\x65\163\x73\x61\x67\145\137\151\x64" => $this->callback->message->message_id, "\164\x65\x78\164" => $text, "\162\x65\160\154\171\137\x6d\x61\162\x6b\x75\x70" => json_encode(array("\151\x6e\154\151\156\145\137\153\x65\171\142\157\x61\x72\144" => array(array(array("\164\145\x78\x74" => $this->phrase->findPhrase("\x73\145\154\145\143\164\x65\144\x5f\x73\145\162\x76\145\x72", "\x62\x75\171"), "\143\141\x6c\154\x62\141\x63\x6b\x5f\144\141\x74\x61" => "\x73\x65\154\154\x5f\x6c\x6f\x67\x69\x6e\75" . $this->server_id), array("\164\x65\x78\164" => $this->phrase->findPhrase("\x73\145\154\x65\143\164\145\x64\137\163\x65\x72\x76\145\162", "\x67\145\x6e\x65\x72\141\164\145\137\x74\145\163\x74"), "\143\141\154\154\x62\141\143\153\137\144\x61\164\x61" => "\164\x65\x73\164\x65\72\x73\151\144\75" . $this->server_id)), array(array("\164\x65\170\x74" => $this->phrase->findPhrase("\x73\x65\154\145\143\x74\x65\x64\137\x73\145\162\x76\x65\162", "\163\x65\154\145\x63\164\x5f\157\x74\x68\x65\162\x5f\x73\x65\162\x76\x65\162"), "\143\x61\x6c\154\x62\141\x63\x6b\x5f\144\141\164\x61" => "\x62\x75\x79")), array(array("\164\x65\170\164" => $this->phrase->findPhrase("\x68\x6f\155\x65"), "\x63\141\154\x6c\x62\141\x63\x6b\137\144\141\164\141" => "\x68\157\x6d\x65"))))))); } if (strpos($this->callback->data, "\163\145\x6c\154\x5f\154\157\147\x69\x6e\75") !== false) { $this->server_id = str_replace("\163\x65\154\x6c\137\x6c\157\147\x69\156\75", '', $this->callback->data); $server = (new Server())->findById($this->server_id); $price = "\122\44" . number_format($server->price_per_login, 2, "\54", "\x2e"); return $this->run("\x65\x64\151\164\x4d\x65\163\163\141\x67\x65\x54\145\170\x74", array("\x63\150\141\x74\x5f\x69\x64" => $this->callback->from->id, "\x6d\145\163\x73\x61\147\x65\137\151\x64" => $this->callback->message->message_id, "\x74\145\170\164" => $this->phrase->findPhrase("\163\x65\154\145\x63\x74\145\x64\137\x73\145\x72\166\x65\162\x5f\x69\x6e\x66\157"), "\x72\145\160\154\171\137\x6d\141\162\x6b\165\160" => json_encode(array("\151\156\154\151\x6e\145\x5f\153\x65\171\x62\157\141\162\x64" => array(array(array("\x74\x65\170\164" => "\x50\x61\147\x61\162\40" . $price, "\143\141\x6c\x6c\x62\x61\x63\x6b\x5f\144\141\x74\141" => "\160\x61\171\155\x65\x6e\164\72\163\145\x72\166\145\162\75" . $this->server_id)), array(array("\x74\145\170\164" => $this->phrase->findPhrase("\163\x65\154\x65\143\164\x65\144\x5f\x73\x65\162\166\x65\x72", "\163\145\162\x76\145\x72\x5f\x69\156\x66\157"), "\x63\x61\154\154\x62\141\143\x6b\137\x64\141\x74\x61" => "\163\x65\x72\166\x65\162\x5f\151\x64\75" . $this->server_id)), array(array("\x74\x65\170\164" => $this->phrase->findPhrase("\163\x65\154\x65\143\x74\x65\144\137\163\145\x72\166\145\162", "\x73\x65\154\x65\x63\164\x5f\157\x74\x68\x65\162\x5f\163\x65\162\166\145\162"), "\x63\141\x6c\154\142\x61\143\153\137\144\141\164\141" => "\x62\x75\x79")), array(array("\164\145\170\164" => $this->phrase->findPhrase("\x68\157\155\145"), "\x63\x61\x6c\x6c\142\141\x63\x6b\x5f\x64\x61\164\141" => "\x68\157\155\x65"))))))); } if (strpos($this->callback->data, "\160\x61\x79\155\145\x6e\x74\x3a\x73\145\162\166\145\x72\75") !== false) { $this->server_id = str_replace("\160\141\x79\155\145\x6e\164\72\x73\x65\x72\x76\x65\162\75", '', $this->callback->data); $server = (new Server())->findById($this->server_id); $bot = (new Bot())->find("\x74\157\153\145\x6e\x3d\x3a\164\x6f\x6b\x65\156", "\x74\157\x6b\145\x6e\75{$this->token}")->fetch(); $adm = (new Administration())->findById(1); if (empty($adm)) { return $this->run("\x65\x64\x69\164\115\145\x73\x73\x61\x67\145\124\145\x78\x74", array("\x63\x68\x61\x74\137\x69\x64" => $this->callback->from->id, "\155\x65\x73\x73\x61\x67\x65\x5f\x69\144" => $this->callback->message->message_id, "\x74\x65\x78\164" => "\117\40\x73\151\x73\164\145\155\141\x20\144\145\x73\164\145\40\x62\157\164\40\141\151\156\144\141\40\x6e\xc3\243\157\40\146\157\151\40\x63\157\x6e\x66\151\x67\165\x72\141\144\x6f\x2e", "\x72\x65\x70\154\171\x5f\x6d\x61\x72\x6b\x75\x70" => json_encode(array("\x69\156\x6c\151\x6e\145\137\x6b\145\171\142\157\141\x72\144" => array(array(array("\x74\x65\x78\x74" => $this->phrase->findPhrase("\150\x6f\155\x65"), "\143\x61\154\x6c\142\x61\143\x6b\137\144\141\x74\x61" => "\x68\157\x6d\145"))))))); } MercadoPago\SDK::setAccessToken($adm->accessToken); $preference = new MercadoPago\Preference(); $item = new MercadoPago\Item(); $item->title = "\x4c\x6f\x67\x69\x6e\x20\x53\x53\x48\40\x2d\40" . $bot->name; $item->quantity = 1; $item->unit_price = $server->price_per_login; $preference->items = array($item); $preference->external_reference = substr(sha1(time()), 0, 9) . "\x2d" . substr(sha1($bot->id), 0, 7) . "\55" . substr(sha1($server->price_per_login), 0, 8) . "\x2d" . substr(sha1($server->id), 0, 9); $preference->notification_url = SITE["\x70\141\171\155\145\x6e\164\137\x6e\157\164\x69\146\171"]; $preference->auto_return = "\141\x6c\154"; $preference->back_urls = array("\x73\165\x63\143\145\163\163" => "\150\164\164\x70\x73\72\x2f\x2f\x74\56\155\145\57" . $bot->username, "\x70\145\x6e\144\151\156\147" => "\x68\164\164\x70\x73\x3a\x2f\x2f\164\56\x6d\x65\x2f" . $bot->username, "\x66\x61\151\154\x75\x72\145" => "\x68\x74\x74\x70\163\72\57\x2f\164\x2e\x6d\x65\57" . $bot->username); if ($preference->save()) { $purchase = new Purchase(); $purchase->bot_id = $bot->id; $purchase->user_id = $this->callback->from->id; $purchase->server_id = $this->server_id; $purchase->status = 0; $purchase->price = $item->unit_price; $purchase->external_reference = $preference->external_reference; if ($purchase->save()) { $oldmessage = new OldMessage(); $oldmessage->message_id = $this->callback->message->message_id; $oldmessage->user_id = $this->callback->from->id; $oldmessage->save(); return $this->run("\x65\144\x69\164\x4d\145\x73\163\x61\x67\145\x54\145\170\164", array("\x63\150\x61\x74\x5f\151\x64" => $this->callback->from->id, "\155\145\x73\163\141\147\145\137\151\144" => $this->callback->message->message_id, "\164\x65\x78\164" => "\x4f\x20\x73\145\x75\x20\154\151\x6e\x6b\40\144\x65\40\160\x61\147\x61\155\x65\156\164\x6f\x20\x66\x6f\x69\x20\x67\145\162\141\144\x6f\x20\143\157\x6d\40\163\x75\143\x65\163\163\x6f\54\x20\x61\147\x6f\162\141\x20\146\x69\x6e\x61\154\x69\x7a\x65\x20\x6f\40\x70\141\147\x61\155\x65\x6e\x74\x6f\40\x63\154\x69\143\141\x6e\144\x6f\40\x6e\157\40\x6c\x69\x6e\153\x20\141\x62\x61\151\170\157", "\162\x65\160\x6c\x79\137\155\x61\x72\x6b\165\x70" => json_encode(array("\151\x6e\154\x69\x6e\x65\x5f\153\145\171\x62\157\x61\x72\x64" => array(array(array("\164\145\170\164" => "\x50\x61\147\x61\162\x20", "\165\x72\x6c" => $preference->init_point))))))); } } $this->notif->text = "\x41\x74\165\141\x6c\151\x7a\145\x20\x6f\x20\163\145\165\40\164\x6f\153\145\x6e\x20\144\157\40\115\145\x72\143\x61\144\157\x20\160\141\x67\157\x2c\40\x75\155\40\x70\162\x6f\x62\x6c\145\x6d\x61\40\146\157\151\x20\145\156\143\x6f\156\164\162\x61\x64\157\x20\141\x6f\40\x67\x65\x72\x61\162\x20\165\x6d\x20\x6c\x69\156\x6b\40\144\x65\x20\x70\141\x67\x61\x6d\x65\156\x74\x6f\x2e"; $this->notif->save(); return $this->run("\x65\144\x69\x74\115\x65\x73\x73\x61\x67\145\x54\145\x78\164", array("\x63\150\141\x74\137\151\144" => $this->callback->from->id, "\155\x65\163\x73\x61\x67\145\137\151\x64" => $this->callback->message->message_id, "\x74\145\170\164" => "\x4f\143\157\x72\162\x65\x75\40\x75\155\40\145\162\x72\x6f\40\x61\x6f\x20\x67\145\x72\141\162\x20\157\x20\x73\145\165\40\x6c\x69\x6e\x6b\40\x64\145\x20\160\141\x67\141\x6d\145\x6e\164\157\x2c\40\x70\157\x72\x20\x66\x61\x76\157\162\x20\166\157\154\x74\x65\40\x61\157\40\151\x6e\xc3\xad\143\151\157\40\x65\40\x74\x65\x6e\164\x65\x20\156\157\166\141\x6d\145\x6e\164\145\x2c\40\x73\x65\x20\x6f\40\160\x72\157\x62\154\x65\x6d\141\40\x70\x65\x72\x73\x69\x73\x74\151\x72\x2c\x20\x65\156\164\162\145\40\145\155\40\x63\x6f\156\164\x61\x74\157\40\143\157\155\40\157\x20\x61\x64\x6d\151\156\151\163\x74\162\x61\144\x6f\162\x20\x64\157\x20\163\x69\x73\x74\x65\x6d\x61\40\x70\x61\x72\x61\x20\x71\x75\x65\x20\157\40\x70\162\x6f\x62\x6c\145\155\x61\x20\163\x65\x6a\141\40\x72\145\x73\157\154\x76\151\144\x6f\56", "\x72\x65\x70\x6c\171\x5f\155\141\162\x6b\x75\160" => json_encode(array("\x69\x6e\154\x69\x6e\x65\137\153\x65\x79\x62\157\x61\x72\144" => array(array(array("\x74\x65\170\164" => $this->phrase->findPhrase("\150\157\155\145"), "\143\141\154\x6c\142\x61\143\x6b\x5f\x64\141\164\x61" => "\x68\157\x6d\x65"))))))); } if (strpos($this->callback->data, "\x67\145\x6e\x65\162\141\x74\x65\x5f\x61\x63\x63") !== false) { $query = str_replace("\x67\x65\x6e\x65\x72\141\x74\x65\137\x61\x63\x63\x3a", '', $this->callback->data); parse_str($query, $parse); $payment = (new Purchase())->findById($parse["\160\x61\171"]); if ($payment->status == 3) { return $this->run("\145\144\151\164\115\x65\163\x73\x61\x67\x65\124\x65\x78\x74", array("\x63\x68\141\164\x5f\x69\144" => $this->callback->from->id, "\155\145\163\x73\141\147\145\137\x69\144" => $this->callback->message->message_id, "\x74\145\x78\164" => "\x41\40\163\165\141\40\x63\x6f\156\x74\x61\40\x6a\xc3\xa1\x20\146\x6f\151\40\147\145\x72\141\x64\x61\54\x20\x76\157\x63\xc3\xaa\x20\x70\x6f\144\145\40\166\x65\x72\151\x66\151\x63\x61\162\40\x74\157\x63\x61\x6e\x64\157\40\156\157\x20\142\157\x74\xc3\xa3\x6f\x20\x61\142\141\151\x78\157", "\x72\145\x70\x6c\x79\x5f\155\x61\x72\x6b\165\x70" => json_encode(array("\x69\x6e\x6c\151\x6e\x65\137\x6b\145\x79\142\x6f\x61\162\x64" => array(array(array("\x74\145\170\164" => $this->phrase->findPhrase("\x73\164\141\162\x74\x5f\142\x75\x74\164\157\156\163", "\x6d\171\x5f\141\x63\x63\157\x75\x6e\x74\163"), "\x63\141\x6c\154\142\141\143\x6b\x5f\144\x61\x74\141" => "\155\x79\137\x61\143\143\157\x75\x6e\x74\x73"))))))); } $server = (new Server())->findById($parse["\x73\x65\x72\x76\145\162"]); $ssh = new SSH2($server->ip); if (!$ssh->login("\x72\157\x6f\x74", $server->server_password)) { $this->notif->text = "\120\162\157\142\x6c\x65\155\x61\x20\144\145\40\141\x75\x74\145\x6e\x74\x69\x63\141\303\xa7\303\243\x6f\x20\156\157\x20\x73\x65\162\x76\x69\144\x6f\x72\x20{$this::flag($server->icon)}\40{$server->ip}\x2e"; $this->notif->save(); return $this->run("\x73\x65\x6e\x64\115\x65\x73\x73\141\147\145", array("\x63\150\x61\164\137\151\x64" => $this->callback->from->id, "\164\145\x78\x74" => "\342\235\214\40\74\x69\76\x4e\xc3\xa3\157\40\146\x6f\x69\40\160\x6f\163\163\xc3\255\x76\x65\x6c\x20\141\x75\x74\x65\x6e\x74\151\x63\141\x72\x20\156\157\40\163\145\162\166\x69\144\157\x72\54\40\164\x6f\161\x75\x65\x20\x6e\x6f\x20\x62\157\x74\303\243\x6f\x20\x70\x61\162\x61\40\x74\145\x6e\x74\141\162\40\x6e\157\166\141\155\x65\156\164\145\56\74\57\151\76")); } if (!$ssh->isAuthenticated()) { return $this->run("\x73\x65\x6e\144\115\x65\x73\163\x61\x67\x65", array("\x63\x68\x61\164\x5f\x69\144" => $this->callback->from->id, "\164\145\170\164" => "\xe2\235\214\40\x3c\151\x3e\x4e\303\xa3\x6f\x20\x66\157\151\40\160\x6f\163\163\303\xad\x76\x65\154\x20\x63\x6f\156\145\x63\164\141\x72\40\141\157\40\163\145\x72\x76\151\144\x6f\162\x2c\40\164\x65\156\x74\x65\x20\x6e\x6f\166\x61\x6d\145\x6e\164\x65\56\74\x2f\x69\x3e")); } if (!$ssh->isConnected()) { return $this->run("\163\x65\156\x64\115\145\163\x73\x61\x67\x65", array("\143\x68\x61\164\137\x69\x64" => $this->callback->from->id, "\x74\145\170\x74" => "\342\235\x8c\40\74\x69\76\116\xc3\243\157\40\146\x6f\x69\40\160\157\x73\x73\xc3\255\x76\145\x6c\x20\143\157\x6e\145\143\164\x61\162\x20\141\157\x20\163\145\x72\x76\151\144\x6f\x72\x2c\x20\164\145\x6e\164\x65\40\x6e\x6f\x76\141\155\145\x6e\164\x65\56\74\x2f\151\76")); } $characters = "\141\142\143\x64\145\x66\x67\150\151\x6a\x6b\x6d\x6e\157\160\x71\x72\163\x74\165\166\x77\170\171\172\101\102\103\104\x45\106\107\x48\x4a\113\114\x4d\x4e\117\120\121\122\123\124\125\126\x57\130\131\x5a\61\62\63\64\x35\66\67\70\x39\60"; $user_ssh = substr(str_shuffle($characters), 0, 7); $pass_ssh = rand(100000, 999999); $res = $ssh->exec("\x63\x64\x20\x2f\x65\164\x63\57\164\x62\157\x74\40\46\46\40\56\x2f\143\x72\151\141\x72\165\163\x75\x61\x72\x69\x6f\x2e\163\150\x20{$user_ssh}\40{$pass_ssh}\x20{$server->acc_duration}\x20\61\x20\x32\x3e\40\x2f\144\145\x76\57\x6e\x75\154\154"); if ($res == 13) { $sshpremium = new UserAccount(); $sshpremium->bot_id = $parse["\x62\157\164"]; $sshpremium->server_id = $parse["\163\x65\162\x76\145\162"]; $sshpremium->payment_id = $parse["\x70\x61\171"]; $sshpremium->user_id = $this->callback->from->id; $sshpremium->ssh_user = $user_ssh; $sshpremium->ssh_pass = $pass_ssh; if ($sshpremium->save()) { $payment->status = 3; $payment->save(); } else { $ssh->exec("\x63\144\x20\57\145\164\x63\x2f\x74\x62\x6f\x74\x20\x26\46\x20\x2e\57\162\x65\155\157\x76\x65\162\x2e\x73\150\x20{$user_ssh}\40\62\76\x20\57\144\x65\166\57\156\165\x6c\154"); unset($ssh); $this->notif->text = "\x46\x61\154\150\x61\40\156\141\40\143\x72\151\x61\xc3\xa7\xc3\243\x6f\40\144\x65\x20\x75\155\40\x75\x73\x75\303\241\162\x69\x6f\x20\156\157\x20\x73\145\x72\x76\x69\144\157\162\40{$this::flag($server->icon)}\40{$server->ip}"; $this->notif->save(); return $this->run("\163\x65\156\144\115\x65\163\x73\x61\x67\x65", array("\x63\x68\141\164\137\151\144" => $this->callback->from->id, "\x6d\145\163\163\x61\147\x65\x5f\151\x64" => $this->callback->message->message_id, "\x74\145\x78\x74" => "\117\x63\157\162\162\145\x75\x20\165\155\40\145\162\x72\157\40\x61\x6f\x20\x67\x65\x72\141\162\40\141\40\x73\165\141\40\143\x6f\156\164\141\54\40\x74\145\156\x74\145\x20\156\157\x76\x61\155\x65\156\x74\x65\x20\145\155\x20\x61\154\x67\165\x6e\x73\40\x73\145\147\165\x6e\144\157\163\56")); } unset($ssh); return $this->run("\x65\x64\x69\164\115\x65\163\x73\141\x67\x65\124\x65\x78\x74", array("\143\150\x61\x74\x5f\151\x64" => $this->callback->from->id, "\x6d\x65\163\163\x61\x67\x65\137\x69\x64" => $this->callback->message->message_id, "\x74\145\170\x74" => "\xe2\234\x85\40\74\142\x3e\x41\x20\x73\165\141\x20\143\x6f\156\164\141\40\146\x6f\x69\x20\147\x65\162\x61\x64\x61\40\143\x6f\155\40\163\x75\143\x65\x73\x73\157\41\x3c\x2f\x62\76\15\xa\15\xa\x55\163\x75\xc3\xa1\162\151\157\x3a\x20\74\143\x6f\x64\145\76{$user_ssh}\x3c\x2f\x63\157\x64\x65\76\15\12\123\x65\156\150\x61\72\x20\x3c\x63\157\x64\145\x3e{$pass_ssh}\x3c\57\x63\x6f\x64\145\x3e\xd\xa\15\xa\74\x69\x3e\x44\151\143\141\x3a\x20\x74\x6f\161\165\145\40\156\x6f\x20\156\157\x6d\x65\x20\144\145\40\x75\x73\165\303\xa1\x72\x69\157\40\145\40\156\x61\x20\163\x65\x6e\x68\141\x20\x70\x61\162\x61\x20\143\157\x70\151\xc3\241\x2d\154\157\x73\x2e\x3c\57\x69\76", "\162\145\160\x6c\x79\x5f\x6d\141\x72\153\x75\x70" => json_encode(array("\151\x6e\x6c\x69\x6e\x65\x5f\153\x65\x79\x62\x6f\141\162\x64" => array(array(array("\x74\145\170\164" => $this->phrase->findPhrase("\163\x74\x61\162\x74\137\x62\165\x74\164\x6f\156\163", "\x6d\x79\x5f\x61\x63\x63\157\x75\x6e\x74\163"), "\x63\141\x6c\x6c\x62\x61\x63\x6b\x5f\x64\x61\164\x61" => "\155\x79\x5f\x61\x63\143\157\x75\156\164\163")), array(array("\164\145\x78\x74" => $this->phrase->findPhrase("\150\x6f\155\x65"), "\x63\x61\154\x6c\142\141\x63\x6b\137\144\141\x74\x61" => "\150\157\155\145"))))))); } unset($ssh); $this->run("\x73\145\156\144\115\x65\x73\x73\x61\x67\x65", array("\143\x68\141\164\x5f\x69\x64" => $this->callback->from->id, "\155\145\x73\163\x61\x67\x65\137\151\144" => $this->callback->message->message_id, "\164\145\170\x74" => "\117\x63\157\162\x72\x65\x75\40\165\x6d\40\145\162\162\x6f\x20\x61\x6f\x20\x67\145\162\141\162\40\x61\x20\163\x75\x61\40\143\157\156\x74\141\54\x20\x74\x65\x6e\x74\x65\40\156\157\166\141\155\145\156\164\145\x20\x65\155\40\141\x6c\147\165\156\x73\40\x73\x65\x67\x75\156\x64\x6f\163\54\40\163\145\40\157\40\x65\162\x72\157\x20\x70\145\x72\x73\151\x73\x74\151\162\x2c\40\145\156\x74\x72\x65\x20\145\x6d\x20\143\157\x6e\x74\141\164\x6f\x20\x63\x6f\x6d\40\x6f\x20\141\x64\x6d\x69\x6e\x69\163\x74\x72\141\144\157\x72\40\x64\157\40\163\151\163\164\145\x6d\x61\x2e")); } if (strpos($this->callback->data, "\164\145\163\164\145") !== false) { if (empty($this->phrase->findPhrase("\x73\x74\141\x72\x74\137\x62\x75\164\164\x6f\x6e\x73", "\144\x6f\x77\x6e\154\157\x61\144\x5f\141\x70\x70\137\154\151\x6e\x6b"))) { return $this->run("\x65\x64\x69\164\x4d\145\163\163\141\x67\145\124\145\x78\164", array("\x63\x68\x61\x74\137\x69\x64" => $this->callback->from->id, "\x6d\x65\x73\x73\141\147\145\137\151\144" => $this->callback->message->message_id, "\164\145\170\164" => "\124\145\163\164\145\163\x20\x69\156\x64\x69\163\x70\x6f\156\xc3\255\x76\x65\x69\x73\40\145\156\161\x75\x61\x6e\x74\x6f\x20\157\x20\142\x6f\164\x20\x6e\xc3\xa3\157\x20\164\x65\x6d\x20\141\x70\x6c\x69\x63\141\x74\151\166\x6f\40\x63\157\156\x66\151\x67\x75\162\141\x64\157\41", "\162\145\160\x6c\171\x5f\x6d\141\x72\x6b\165\x70" => json_encode(array("\151\x6e\x6c\151\156\145\x5f\153\145\171\142\157\141\x72\x64" => array(array(array("\x74\x65\x78\x74" => $this->phrase->findPhrase("\150\x6f\x6d\x65"), "\143\141\154\x6c\142\141\143\153\137\144\141\x74\x61" => "\150\x6f\155\145"))))))); } $server_id = str_replace("\x74\145\x73\164\145\72\x73\151\144\75", '', $this->callback->data); $server = (new Server())->findById($server_id); $now = strtotime("\x6e\157\x77"); $tests = (new Test())->find("\x66\x72\157\x6d\137\x75\163\x65\x72\x3d\72\x75\151\x64\40\x41\x4e\x44\40\145\x78\160\151\162\x61\164\151\157\x6e\40\76\x20\x3a\x65\170\x70", "\x75\151\144\75{$this->callback->from->id}\x26\145\x78\160\x3d{$now}")->limit(1)->order("\151\x64\x20\x44\x45\123\103")->fetch(); if (isset($tests)) { return $this->run("\x65\x64\x69\164\x4d\x65\163\163\x61\147\145\x54\145\x78\x74", array("\x63\x68\x61\x74\137\x69\144" => $this->callback->from->id, "\155\145\x73\163\x61\147\145\x5f\151\144" => $this->callback->message->message_id, "\x74\x65\170\164" => "\x56\x6f\x63\xc3\252\x20\152\303\xa1\40\147\x65\x72\157\x75\x20\165\x6d\x20\x74\x65\163\164\x65\x2c\40\x6e\xc3\xa3\157\40\303\xa9\40\x70\157\x73\x73\303\255\166\x65\x6c\40\x67\145\162\141\x72\40\x6f\165\x74\x72\x6f\40\145\155\40\x6d\145\156\157\163\x20\x64\x65\x20\63\x30\40\x64\151\x61\163\56", "\x72\x65\160\154\x79\137\x6d\141\162\x6b\x75\x70" => json_encode(array("\x69\156\x6c\151\x6e\x65\x5f\153\x65\171\x62\157\x61\162\144" => array(array(array("\x74\x65\x78\x74" => $this->phrase->findPhrase("\x68\x6f\155\145"), "\143\141\x6c\154\142\x61\x63\x6b\x5f\x64\141\164\x61" => "\150\157\155\145"))))))); } $ssh = new SSH2($server->ip); if (!$ssh->login("\162\x6f\157\x74", $server->server_password)) { return $this->run("\145\x64\x69\x74\x4d\145\x73\163\x61\x67\145\x54\x65\x78\164", array("\143\150\141\x74\x5f\151\x64" => $this->callback->from->id, "\x6d\145\163\x73\x61\147\x65\x5f\151\144" => $this->callback->message->message_id, "\164\x65\x78\164" => "\342\x9d\214\x20\x3c\x69\76\117\143\x6f\162\x72\145\x75\40\x75\x6d\x20\145\162\162\157\40\141\x6f\40\x67\145\x72\141\x72\x20\x6f\40\163\145\x75\40\x74\145\163\164\x65\54\40\x61\40\x61\165\x74\145\x6e\x74\x69\x63\141\303\247\303\243\157\40\156\x6f\x20\163\x65\x72\166\x69\x64\157\162\40\x66\141\x6c\x68\157\165\x2e\74\x2f\x69\x3e", "\162\145\x70\x6c\171\x5f\x6d\x61\x72\153\x75\160" => json_encode(array("\x69\156\154\x69\x6e\x65\137\153\x65\x79\142\157\x61\x72\144" => array(array(array("\164\x65\x78\164" => $this->phrase->findPhrase("\x68\157\x6d\x65"), "\143\141\x6c\154\x62\x61\143\x6b\137\x64\141\164\141" => "\x68\157\x6d\x65"))))))); } $user_ssh = substr(str_shuffle("\141\x62\143\144\145\x66\x67\x68\152\x6b\155\156\157\160\161\x72\163\x74\x75\166\x77\170\x79\172\101\102\103\104\105\106\x47\110\x49\112\x4b\114\x4d\116\117\120\x51\x52\x53\x54\125\126\127\x58\131\132\x30\61\62\63\64\65\x36\67\70\x39"), 0, 6); $pass_ssh = rand(10000, 999999); $res = $ssh->exec("\x63\144\x20\57\x65\x74\x63\57\x74\x62\x6f\x74\x20\x26\x26\x20\56\x2f\143\x72\x69\141\x72\165\163\x75\x61\162\x69\157\56\163\150\40{$user_ssh}\x20{$pass_ssh}\x20\x32\x20\61\x20\62\76\x20\57\144\145\166\x2f\x6e\165\154\154"); if ($res != 13) { return $this->run("\145\144\x69\164\115\145\163\163\141\147\x65\124\x65\170\164", array("\x63\x68\x61\164\137\x69\x64" => $this->callback->from->id, "\155\145\163\163\141\147\145\x5f\151\144" => $this->callback->message->message_id, "\x74\145\x78\164" => "\342\x9d\x8c\x20\x3c\x69\76\x4f\x63\157\x72\x72\145\x75\40\165\x6d\x20\x65\162\x72\157\x20\x61\157\x20\147\145\162\141\162\40\157\x20\x73\x65\165\40\x74\145\163\x74\x65\x2c\x20\164\x65\x6e\164\x65\40\156\157\x76\x61\x6d\145\156\x74\145\x2e\74\57\x69\76\40{$res}", "\162\x65\x70\154\x79\137\155\141\162\x6b\x75\x70" => json_encode(array("\151\x6e\154\151\156\x65\x5f\x6b\x65\x79\142\157\x61\162\144" => array(array(array("\x74\145\170\x74" => $this->phrase->findPhrase("\x68\157\x6d\145"), "\x63\x61\154\x6c\142\x61\143\x6b\137\x64\141\164\x61" => "\150\157\x6d\x65"))))))); } $test = new Test(); $test->server_id = $server->id; $test->from_user = $this->callback->from->id; $test->user_ssh = $user_ssh; $test->pass_ssh = $pass_ssh; $test->expiration = strtotime("\x2b\x20\63\x30\x20\144\x61\171"); $test->save(); return $this->run("\145\144\x69\164\x4d\145\163\x73\141\x67\x65\124\x65\170\164", array("\x63\x68\x61\164\x5f\151\144" => $this->callback->from->id, "\x6d\145\163\163\x61\x67\x65\137\x69\144" => $this->callback->message->message_id, "\164\145\170\164" => "\74\x62\x3e\x4f\x20\163\145\x75\40\164\145\x73\164\145\x20\146\x6f\151\40\147\x65\162\141\144\157\40\143\157\155\x20\163\x75\143\x65\x73\163\157\x21\x3c\x2f\x62\x3e\15\xa\15\12\360\237\x91\244\40\74\142\76\125\163\x75\303\xa1\x72\151\x6f\72\74\57\142\x3e\40{$user_ssh}\xd\12\360\x9f\x94\221\40\74\x62\76\123\145\156\150\141\72\74\57\x62\x3e\40{$pass_ssh}\15\xa\xe2\x8f\xb3\x20\x3c\142\x3e\x44\x75\x72\x61\xc3\247\303\xa3\x6f\72\74\x2f\x62\76\x20{$server->test_duration}\x20\x6d\x69\x6e\x75\164\157\x73\xd\12\15\xa\x3c\x69\76\x54\157\x71\x75\x65\40\x6e\157\40\156\x6f\x6d\145\40\144\145\x20\x75\163\165\303\241\162\x69\x6f\40\145\x20\156\x61\40\163\x65\x6e\x68\141\40\160\x61\162\x61\x20\x63\157\x70\151\141\162\54\40\x73\x65\x20\x76\157\143\xc3\xaa\40\163\145\x20\144\x65\x73\146\141\172\x65\x72\x20\x64\145\163\x74\x61\x20\x6d\x65\x6e\163\141\147\x65\x6d\x2c\x20\157\x20\x73\x65\x75\x20\165\x73\x75\303\241\x72\151\x6f\x20\145\x20\x73\x65\x6e\x68\x61\x20\144\x65\x20\x74\x65\x73\164\145\40\x6e\303\243\x6f\40\x70\157\144\145\x72\303\xa1\40\x73\145\162\40\x72\x65\x63\165\x70\145\x72\141\x64\x6f\40\x64\145\160\157\151\x73\x2e\x3c\x2f\x69\x3e", "\162\145\160\154\171\137\155\x61\x72\x6b\x75\x70" => json_encode(array("\x69\156\x6c\x69\156\x65\137\153\145\x79\x62\157\141\x72\x64" => array(array(array("\x74\145\x78\164" => $this->phrase->findPhrase("\x68\x6f\x6d\145"), "\143\x61\x6c\154\142\141\143\153\x5f\x64\141\164\x61" => "\x68\x6f\x6d\x65")), array(array("\x74\x65\x78\164" => $this->phrase->findPhrase("\x73\x74\141\x72\164\137\x62\165\x74\164\x6f\x6e\x73", "\x64\157\x77\156\x6c\x6f\141\x64\137\141\x70\160"), "\165\162\x6c" => $this->phrase->findPhrase("\x73\x74\141\x72\x74\137\142\165\164\164\157\156\163", "\x64\x6f\167\156\x6c\157\x61\x64\x5f\141\160\x70\137\x6c\151\x6e\x6b")))))))); } switch ($this->callback->data) { case "\x62\x75\171": $servers = (new Server())->find()->fetch(true); if (empty($servers)) { return $this->run("\x65\144\151\164\x4d\145\163\163\141\x67\145\x54\145\170\164", array("\143\150\141\164\137\151\x64" => $this->callback->message->from->id, "\155\x65\163\163\141\147\145\x5f\x69\x64" => $this->callback->message->message_id, "\x74\x65\170\x74" => "\74\x69\x3e\x4f\x20\141\x64\155\x69\x6e\x69\x73\x74\162\x61\x64\157\x72\40\x64\157\40\142\157\164\40\x61\151\x6e\x64\x61\x20\x6e\xc3\xa3\157\40\x61\x64\151\143\151\x6f\156\x6f\x75\x20\163\x65\162\x76\151\144\157\162\145\x73\56\x3c\57\151\76")); } $buttons = array(); foreach ($servers as $server) { $name = preg_replace(array("\57\x5b\56\x5d\x28\x5c\144\173\63\x7d\51\x5b\56\135\x2f", "\x2f\x5b\56\135\50\134\167\173\x34\x2c\175\51\x5b\x2e\x5d\57", "\x2f\x28\133\x61\55\172\x5d\x7b\x33\x7d\51\x5b\x2e\x5d\x28\133\x61\x2d\x7a\135\173\62\54\175\51\57"), array("\x2e\x2a\52\x2a\56", "\56\52\x2a\x2a\x2e", "\52\52\x2a\x2e\52\x2a\52"), strtolower($server->ip), 1); $buttons[] = array(array("\x74\x65\170\x74" => $this::flag($server->icon) . $name, "\143\141\154\154\x62\x61\x63\153\137\x64\x61\x74\x61" => "\x73\145\x72\x76\145\x72\x5f\x69\144\x3d" . $server->id)); } $buttons[] = array(array("\x74\x65\x78\164" => $this->phrase->findPhrase("\x68\x6f\x6d\x65"), "\143\x61\x6c\154\x62\x61\x63\x6b\x5f\144\141\164\141" => "\x68\x6f\155\145")); $this->run("\x65\x64\x69\164\115\145\x73\163\x61\147\x65\x54\x65\x78\164", array("\x63\x68\x61\164\137\x69\x64" => $this->callback->from->id, "\155\x65\x73\x73\141\x67\x65\x5f\151\144" => $this->callback->message->message_id, "\x74\145\170\x74" => MESSAGES["\x73\x65\x6c\145\143\x74\x5f\163\145\162\x76\145\162"], "\162\145\x70\x6c\x79\x5f\155\141\x72\x6b\165\160" => json_encode(array("\x69\x6e\154\x69\156\145\137\153\145\x79\x62\157\141\x72\144" => $buttons)))); break; case "\x68\157\x6d\x65": $oldmessages = (new OldMessage())->find("\165\163\x65\x72\137\x69\x64\x3d\x3a\x75\x69\x64", "\165\x69\x64\75" . $this->callback->from->id)->fetch(true); if (isset($oldmessages)) { foreach ($oldmessages as $old) { $this->run("\x64\145\x6c\145\164\145\x4d\x65\163\x73\141\147\x65", array("\143\x68\141\x74\137\x69\144" => $old->user_id, "\x6d\x65\163\x73\141\147\x65\x5f\151\x64" => $old->message_id)); $old->destroy(); } } $accounts = (new Purchase())->find("\x75\163\x65\162\x5f\x69\144\x3d\x3a\165\x73\145\x72\x20\x41\x4e\x44\40\x73\164\x61\164\165\x73\75\x3a\x73\x74\141\x74\x75\163", "\x75\163\145\x72\x3d{$this->callback->from->id}\x26\x73\164\141\164\165\163\75\63")->fetch(true); $servers = (new Server())->find()->fetch(true); $buy = "\142\165\171"; if (count($servers) == 1) { $buy = "\163\145\x72\166\x65\162\x5f\x69\x64\75" . $servers[0]->id . "\x75\x6e\151\161\x5f\163\x65\x72\x76\x65\x72"; } if (isset($accounts)) { $buttons = array(array(array("\164\x65\x78\164" => $this->phrase->findPhrase("\x73\x74\141\x72\164\137\142\165\164\x74\x6f\156\x73", "\142\165\171\137\x61\x63\143\x6f\165\x6e\x74"), "\143\x61\154\154\142\x61\143\x6b\x5f\144\141\164\x61" => $buy)), array(array("\164\x65\170\164" => $this->phrase->findPhrase("\x73\164\141\x72\164\x5f\x62\x75\164\x74\157\x6e\x73", "\x6d\x79\x5f\x61\143\143\157\x75\x6e\x74\163"), "\x63\141\x6c\154\142\141\143\153\137\144\141\x74\x61" => "\155\171\137\x61\143\x63\x6f\165\x6e\164\163"))); if ($this->phrase->findPhrase("\x73\x74\x61\x72\x74\x5f\142\x75\164\164\x6f\x6e\x73", "\x63\154\151\145\156\164\163\x5f\147\x72\157\165\x70\137\154\x69\156\153")) { $buttons[] = array(array("\x74\145\x78\164" => $this->phrase->findPhrase("\163\x74\141\162\x74\137\x62\x75\x74\164\x6f\156\163", "\x63\x6c\x69\145\156\164\163\137\x67\x72\x6f\x75\x70"), "\165\x72\154" => $this->phrase->findPhrase("\163\x74\x61\x72\x74\x5f\142\165\x74\164\157\x6e\163", "\x63\x6c\x69\x65\156\x74\x73\137\147\162\157\x75\160\137\x6c\x69\x6e\x6b"))); } } else { $buttons = array(array(array("\164\x65\x78\x74" => $this->phrase->findPhrase("\163\x74\x61\162\164\137\x62\165\164\x74\x6f\x6e\x73", "\142\165\171\x5f\x61\143\143\157\165\x6e\x74"), "\143\141\x6c\x6c\142\x61\x63\153\x5f\x64\x61\x74\x61" => $buy))); } if ($this->phrase->findPhrase("\163\164\141\162\164\x5f\x62\165\x74\x74\x6f\x6e\x73", "\144\157\x77\x6e\154\x6f\x61\x64\x5f\141\160\x70") != null) { $buttons += array(array("\x74\145\170\x74" => $this->phrase->findPhrase("\x73\164\141\x72\164\x5f\142\x75\x74\164\157\x6e\x73", "\x64\157\x77\156\x6c\157\141\x64\137\141\x70\x70"), "\165\162\154" => $this->phrase->findPhrase("\163\x74\141\x72\x74\x5f\142\165\164\164\x6f\156\x73", "\x64\x6f\x77\x6e\154\x6f\x61\x64\x5f\141\x70\x70\x5f\154\151\156\x6b"))); } return $this->run("\x65\x64\x69\164\x4d\145\163\x73\x61\147\x65\124\x65\170\x74", array("\143\x68\x61\164\137\x69\144" => $this->callback->from->id, "\155\x65\x73\163\x61\147\x65\137\x69\144" => $this->callback->message->message_id, "\164\145\x78\x74" => $this->updateMessageVars($this->phrase->findPhrase("\163\x74\x61\162\164")), "\x72\145\160\x6c\171\x5f\155\141\162\153\x75\x70" => json_encode(array("\x69\x6e\154\151\156\x65\x5f\153\x65\171\142\x6f\x61\x72\144" => $buttons)))); break; case "\155\x79\137\x61\143\x63\x6f\165\x6e\x74\x73": $accounts = (new UserAccount())->find("\165\163\x65\x72\137\x69\x64\75\x3a\x75\151\x64", "\x75\151\x64\x3d{$this->callback->from->id}")->fetch(true); $text = "\74\142\x3e\115\x69\x6e\x68\x61\163\40\103\x6f\x6e\164\x61\163\74\x2f\x62\x3e"; foreach ($accounts as $acc) { $text .= "\15\12\15\12\360\237\221\xa4\40\74\x62\x3e\x55\163\x75\303\xa1\162\151\157\x3a\74\x2f\142\x3e\40\x3c\x63\157\x64\x65\76{$acc->ssh_user}\74\57\143\157\x64\x65\76\xd\12\xf0\237\224\x91\40\x3c\142\76\123\145\156\x68\141\x3a\74\x2f\x62\76\x20\74\x63\x6f\x64\145\x3e{$acc->ssh_pass}\74\57\x63\157\x64\x65\76\xd\xa\360\237\x93\206\40\74\142\76\103\x72\151\x61\144\141\x20\x65\x6d\72\74\57\x62\x3e\x20" . date("\144\57\155\57\171", strtotime($acc->created_at) . PHP_EOL); } return $this->run("\145\144\x69\x74\115\x65\x73\163\x61\147\145\x54\145\x78\164", array("\143\x68\x61\164\137\151\144" => $this->callback->from->id, "\x6d\145\x73\x73\141\147\x65\x5f\x69\x64" => $this->callback->message->message_id, "\164\x65\170\x74" => $text, "\x72\145\160\x6c\171\x5f\x6d\141\162\x6b\x75\x70" => json_encode(array("\x69\156\x6c\x69\156\145\x5f\x6b\x65\171\142\157\x61\162\x64" => array(array(array("\x74\145\170\164" => $this->phrase->findPhrase("\150\157\155\x65"), "\143\x61\x6c\154\x62\141\x63\x6b\x5f\144\x61\x74\x61" => "\x68\157\155\145"))))))); break; } } private static function flag(int $flag, $show_name = false) { switch ($flag) { case 1: return $show_name ? "\xf0\237\207\247\360\x9f\x87\267\x20\102\x72\141\x73\151\x6c" : "\xf0\237\x87\xa7\360\237\207\xb7\x20"; break; case 2: return $show_name ? "\360\237\x87\272\360\237\x87\270\40\105\163\x74\x61\144\157\x73\x20\x55\x6e\151\x64\x6f\x73" : "\360\237\x87\xba\360\x9f\207\270\40"; break; case 3: return $show_name ? "\360\237\x87\xa8\xf0\237\x87\xa6\x20\103\x61\156\141\144\303\241" : "\360\x9f\x87\xa8\360\237\207\246\x20"; break; case 4: return $show_name ? "\360\x9f\x87\257\360\237\207\xb5\40\112\141\x70\303\243\x6f" : "\360\237\x87\xaf\xf0\x9f\x87\xb5\x20"; break; case 5: return $show_name ? "\xf0\x9f\207\xab\xf0\237\207\267\40\x46\162\x61\x6e\xc3\xa7\x61" : "\360\237\207\xab\xf0\237\207\xb7\40"; break; default: return $show_name ? "\xf0\x9f\207\247\360\x9f\207\267\x20\102\162\141\x73\x69\154" : "\360\x9f\x87\xa7\xf0\237\207\267\x20"; break; } } private function updateMessageVars(string $text) { return str_replace(array("\125\x53\105\122\137\116\x41\115\x45", "\125\123\105\x52\x5f\114\101\123\x54\x4e\101\115\105"), array($this->callback->from->first_name, $this->callback->from->last_name), $text); } }

Function Calls

None

Variables

None

Stats

MD5 a6080bc25cf8b9c45203816303521768
Eval Count 0
Decode Time 75 ms