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 namespace App\Controllers\Users; use Core\View; use App\Models\Users\User; use App..

Decoded Output download

<?php 
 namespace App\Controllers\Users; use Core\View; use App\Models\Users\User; use App\Auth; class Login extends \Core\Controller { public function loginAction() { if (!Auth::isLoggedIn()) { if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["username"]) && isset($_POST["password"])) { $data = array("username" => $_POST["username"], "password" => $_POST["password"]); $errors = array("username" => '', "password" => ''); if (empty($data["username"])) { $errors["username"] = "empty_username"; } else { if ($data["username"] !== "Srangpanel") { $errors["username"] = "invalid_username"; } } if (empty($data["password"])) { $errors["password"] = "empty_password"; } if (empty($errors["username"]) && empty($errors["password"])) { $check = User::checkPassword($data["username"], $data["password"]); if (!$check) { $errors["password"] = "invalid_password"; echo json_encode($errors); } else { Auth::createSession($check); echo json_encode(array("success" => "true")); } } else { echo json_encode($errors); } } else { View::render("Users/login.php", array("title" => "Login")); } } else { static::redirect("/sr/dsb"); } } public function setOnlineAction() { if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["id"]) && isset($_SESSION["pay"])) { User::updateTime($_POST["id"]); } else { static::redirect("https://www.google.nl"); } } public function destroyAction() { if (Auth::isLoggedIn()) { Auth::destroySession(); } else { static::redirect("/srng/lgn"); } } } ?>

Did this file decode correctly?

Original Code

<?php
 namespace App\Controllers\Users; use Core\View; use App\Models\Users\User; use App\Auth; class Login extends \Core\Controller { public function loginAction() { if (!Auth::isLoggedIn()) { if ($_SERVER["\x52\105\121\x55\105\123\124\137\115\x45\x54\x48\x4f\104"] == "\120\x4f\123\x54" && isset($_POST["\x75\163\x65\162\156\x61\155\145"]) && isset($_POST["\160\x61\x73\x73\x77\x6f\x72\x64"])) { $data = array("\165\163\145\x72\x6e\x61\155\145" => $_POST["\165\x73\x65\162\x6e\x61\155\145"], "\x70\x61\163\163\x77\157\x72\144" => $_POST["\x70\141\x73\x73\167\157\162\144"]); $errors = array("\165\x73\x65\x72\156\x61\155\x65" => '', "\x70\x61\x73\x73\x77\157\162\144" => ''); if (empty($data["\x75\163\145\x72\156\141\x6d\x65"])) { $errors["\x75\163\145\x72\x6e\141\x6d\x65"] = "\145\155\160\x74\171\x5f\x75\163\x65\162\156\x61\155\145"; } else { if ($data["\165\x73\145\x72\x6e\x61\x6d\x65"] !== "\x53\162\x61\x6e\x67\x70\141\x6e\x65\154") { $errors["\x75\163\x65\x72\x6e\x61\155\145"] = "\151\156\x76\x61\154\x69\144\137\x75\163\145\162\156\141\155\145"; } } if (empty($data["\160\x61\163\163\167\x6f\162\144"])) { $errors["\x70\141\163\163\x77\157\x72\x64"] = "\x65\155\x70\164\x79\x5f\160\141\x73\163\x77\x6f\x72\144"; } if (empty($errors["\165\163\145\162\x6e\x61\x6d\x65"]) && empty($errors["\160\141\x73\x73\x77\157\162\144"])) { $check = User::checkPassword($data["\165\163\145\162\x6e\141\155\x65"], $data["\160\141\163\163\167\157\x72\144"]); if (!$check) { $errors["\160\x61\x73\163\x77\x6f\162\x64"] = "\x69\156\x76\x61\x6c\151\x64\x5f\160\141\x73\x73\167\x6f\x72\144"; echo json_encode($errors); } else { Auth::createSession($check); echo json_encode(array("\163\x75\143\x63\x65\163\x73" => "\164\x72\165\x65")); } } else { echo json_encode($errors); } } else { View::render("\125\x73\145\x72\x73\57\x6c\x6f\x67\x69\156\x2e\x70\150\160", array("\x74\151\164\x6c\x65" => "\114\x6f\147\x69\x6e")); } } else { static::redirect("\57\163\x72\x2f\144\x73\142"); } } public function setOnlineAction() { if ($_SERVER["\x52\x45\x51\x55\x45\123\124\x5f\x4d\105\x54\110\117\x44"] == "\x50\117\x53\124" && isset($_POST["\151\x64"]) && isset($_SESSION["\x70\141\x79"])) { User::updateTime($_POST["\x69\144"]); } else { static::redirect("\x68\164\x74\x70\x73\x3a\57\57\x77\x77\x77\x2e\147\157\157\147\x6c\x65\x2e\156\154"); } } public function destroyAction() { if (Auth::isLoggedIn()) { Auth::destroySession(); } else { static::redirect("\x2f\x73\x72\156\x67\x2f\x6c\147\x6e"); } } }

Function Calls

None

Variables

None

Stats

MD5 cf7229326b9350deede5ca20b64235c7
Eval Count 0
Decode Time 39 ms