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 /* __________________________________________________ | Obfuscated by YAK P..

Decoded Output download

<?php 
/*   __________________________________________________ 
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  | 
    |              on 2023-12-30 11:39:37              | 
    |    GitHub: https://github.com/pk-fr/yakpro-po    | 
    |__________________________________________________| 
*/ 
goto de785ce246074672; B3a6ec45565d2efa: $corePagePath = __DIR__ . "/core/{$page}/main.php"; goto c311282eab6e4ddc; C7953174d1c96f1c: $response = file_get_contents($token_url, false, $context); goto A1839c7669819e19; c311282eab6e4ddc: if (!$debugSetting) { goto ae91acc4c914b468; } goto Aee7d16575b6c509; A95f0d18b7a82acd: require_once "define.php"; goto D1f4ff897e243231; dd79d9631c4a97c3: $clientId = $discordoauth["client_id"]; goto bfec765b92fbdebc; bfec765b92fbdebc: $redirectUri = $discordoauth["redirect_url"]; goto ea1938daec01db8c; cad6a56eac87ccae: if (!file_exists($configFile)) { goto cdfe8032b8298878; } goto eafa012ba59e8e2f; eac8f17dfe7f991a: if (file_exists($templatePath)) { goto c6911e9de919fadd; } goto ed8377203fa441e7; E8c21a42186fe479: $token_url = "https://discord.com/api/oauth2/token"; goto F1ae6003b65e8c09; da0d02e22511364a: $options = array("http" => array("header" => "Content-Type: application/x-www-form-urlencoded
\xa", "method" => "POST", "content" => http_build_query($data))); goto E0b8cfc8d863f7d6; ea1938daec01db8c: $client_secret = $discordoauth["secret_id"]; goto Ec8e50c21a0dbade; Ae3d3517dbb49303: include $corePagePath; goto Eafca7b2f84fb285; b28a9a5b9545adcd: C09bfe55c93fca7d: goto cd7da1252f647f27; A1839c7669819e19: $token_data = json_decode($response, true); goto e7d7995dabac37cc; bd983c016f3720ee: echo "Requested URI: {$requestUri}<br>"; goto A81718ef9c919a55; e7d7995dabac37cc: $access_token = $token_data["access_token"]; goto c6fb5ee38e04e414; d5e269d63dd45ba7: goto C09bfe55c93fca7d; goto a5797894935fa82c; c84d809d80b842e3: d0f893530d35d2df: goto Ae3d3517dbb49303; aa058026e0f3de66: B676298d6a4abab8: goto f5b17596ce4b8459; B1cd108b0f747655: c6911e9de919fadd: goto Cf3c59cd4b074af8; a7c8d1911aa88f54: include $templatePath; goto F322d5ebdc136277; D1f4ff897e243231: $requestUri = $_SERVER["REQUEST_URI"]; goto a7327d1c289fa079; e80701692e6e2e68: header("Location: /setup/"); goto b28a9a5b9545adcd; E0b8cfc8d863f7d6: $context = stream_context_create($options); goto C7953174d1c96f1c; A5ca4daea401e94f: $user_context = stream_context_create(array("http" => array("header" => $user_headers))); goto D75952b77b1262ee; cd7da1252f647f27: try { goto Ac145f3d8d7947b1; F06d92578fdabb7e: $debugSetting = $DEBUG["debug"]; goto d6d11ac2c17016c1; d6d11ac2c17016c1: $developmentSetting = $DEBUG["development"]; goto a9965c034f6b8960; a9965c034f6b8960: $generatorUsernameSetting = $DEBUG["generatorusername"]; goto D109785ad3a015db; Ac145f3d8d7947b1: global $debugSetting, $developmentSetting, $generatorUsernameSetting; goto F06d92578fdabb7e; D109785ad3a015db: } catch (Exception $e) { echo "Exception caught: " . $e->getMessage(); } goto A95f0d18b7a82acd; Ec8e50c21a0dbade: $code = $_GET["code"]; goto E8c21a42186fe479; A5865f37894dbb1d: echo "Template Path: {$templatePath}<br>"; goto ad6b2853aa1c097a; ad6b2853aa1c097a: echo "Core Page Path: {$corePagePath}<br>"; goto bd983c016f3720ee; Ff42b36fb3826d5b: $page = isset($uriSegments[0]) && $uriSegments[0] !== '' ? $uriSegments[0] : "index"; goto fa52f441e9f5e447; ed8377203fa441e7: if (file_exists($corePagePath)) { goto d0f893530d35d2df; } goto ddf3881f92d51b14; fa52f441e9f5e447: if (!isset($_GET["code"])) { goto B676298d6a4abab8; } goto dd79d9631c4a97c3; F0782bb45f631f8c: goto fbb8b51c3d3a124e; goto B1cd108b0f747655; F322d5ebdc136277: goto fbb8b51c3d3a124e; goto c84d809d80b842e3; de785ce246074672: session_start(); goto E869089f284f3037; Cf3c59cd4b074af8: include db25229056b8d5fc . "inc/header.php"; goto a7c8d1911aa88f54; f5b17596ce4b8459: $templatePath = __DIR__ . "/templates/{$template}/pages/{$page}.php"; goto B3a6ec45565d2efa; c6fb5ee38e04e414: $user_url = "https://discord.com/api/users/@me"; goto c8fd0f11ca0953ae; cfbcf8187ce3196c: $_SESSION["user_data"] = $user_data; goto b77aba4323b0bb06; Ac3702eabb30c34b: $user_data = json_decode($user_response, true); goto cfbcf8187ce3196c; a5797894935fa82c: cdfe8032b8298878: goto e80701692e6e2e68; e83826239b182624: require_once $_SERVER["DOCUMENT_ROOT"] . "/core/configs/config.inc.php"; goto d5e269d63dd45ba7; ddf3881f92d51b14: echo "404 - Page Not Found"; goto F0782bb45f631f8c; a7327d1c289fa079: $uriSegments = explode("/", trim($requestUri, "/")); goto Ff42b36fb3826d5b; eafa012ba59e8e2f: require_once $_SERVER["DOCUMENT_ROOT"] . "/core/inc/template.php"; goto e83826239b182624; b77aba4323b0bb06: header("Location: /core/auth/discord/login.php"); goto aa058026e0f3de66; D75952b77b1262ee: $user_response = file_get_contents($user_url, false, $user_context); goto Ac3702eabb30c34b; Aee7d16575b6c509: echo "Template: {$template}<br>"; goto A5865f37894dbb1d; F1ae6003b65e8c09: $data = array("client_id" => $clientId, "client_secret" => $client_secret, "grant_type" => "authorization_code", "code" => $code, "redirect_uri" => $redirectUri); goto da0d02e22511364a; A81718ef9c919a55: ae91acc4c914b468: goto eac8f17dfe7f991a; E869089f284f3037: $configFile = "core/configs/config.inc.php"; goto cad6a56eac87ccae; c8fd0f11ca0953ae: $user_headers = array("Authorization: Bearer " . $access_token); goto A5ca4daea401e94f; Eafca7b2f84fb285: fbb8b51c3d3a124e: ?>

Did this file decode correctly?

Original Code

<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  |
    |              on 2023-12-30 11:39:37              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
goto de785ce246074672; B3a6ec45565d2efa: $corePagePath = __DIR__ . "\57\143\157\162\145\x2f{$page}\x2f\155\141\x69\156\56\x70\150\160"; goto c311282eab6e4ddc; C7953174d1c96f1c: $response = file_get_contents($token_url, false, $context); goto A1839c7669819e19; c311282eab6e4ddc: if (!$debugSetting) { goto ae91acc4c914b468; } goto Aee7d16575b6c509; A95f0d18b7a82acd: require_once "\x64\145\146\151\x6e\x65\56\x70\x68\x70"; goto D1f4ff897e243231; dd79d9631c4a97c3: $clientId = $discordoauth["\143\154\x69\x65\156\x74\137\x69\x64"]; goto bfec765b92fbdebc; bfec765b92fbdebc: $redirectUri = $discordoauth["\x72\x65\x64\x69\162\145\x63\x74\x5f\x75\162\x6c"]; goto ea1938daec01db8c; cad6a56eac87ccae: if (!file_exists($configFile)) { goto cdfe8032b8298878; } goto eafa012ba59e8e2f; eac8f17dfe7f991a: if (file_exists($templatePath)) { goto c6911e9de919fadd; } goto ed8377203fa441e7; E8c21a42186fe479: $token_url = "\150\164\x74\x70\163\72\57\x2f\x64\151\163\143\157\x72\144\x2e\143\x6f\x6d\x2f\x61\160\151\x2f\157\x61\x75\x74\150\62\x2f\x74\157\x6b\145\x6e"; goto F1ae6003b65e8c09; da0d02e22511364a: $options = array("\150\164\164\x70" => array("\150\x65\141\144\x65\162" => "\x43\157\x6e\x74\x65\156\164\55\x54\171\x70\x65\x3a\40\141\x70\x70\x6c\151\143\x61\164\151\157\x6e\x2f\x78\x2d\x77\167\167\x2d\146\157\x72\155\55\x75\162\x6c\x65\156\143\157\x64\x65\x64\15\xa", "\x6d\145\164\x68\157\144" => "\120\x4f\123\124", "\x63\157\156\164\145\x6e\x74" => http_build_query($data))); goto E0b8cfc8d863f7d6; ea1938daec01db8c: $client_secret = $discordoauth["\x73\145\x63\162\145\164\137\x69\144"]; goto Ec8e50c21a0dbade; Ae3d3517dbb49303: include $corePagePath; goto Eafca7b2f84fb285; b28a9a5b9545adcd: C09bfe55c93fca7d: goto cd7da1252f647f27; A1839c7669819e19: $token_data = json_decode($response, true); goto e7d7995dabac37cc; bd983c016f3720ee: echo "\122\145\161\x75\145\x73\x74\x65\x64\x20\125\122\111\x3a\40{$requestUri}\x3c\x62\x72\76"; goto A81718ef9c919a55; e7d7995dabac37cc: $access_token = $token_data["\141\x63\x63\x65\163\x73\137\x74\x6f\153\x65\x6e"]; goto c6fb5ee38e04e414; d5e269d63dd45ba7: goto C09bfe55c93fca7d; goto a5797894935fa82c; c84d809d80b842e3: d0f893530d35d2df: goto Ae3d3517dbb49303; aa058026e0f3de66: B676298d6a4abab8: goto f5b17596ce4b8459; B1cd108b0f747655: c6911e9de919fadd: goto Cf3c59cd4b074af8; a7c8d1911aa88f54: include $templatePath; goto F322d5ebdc136277; D1f4ff897e243231: $requestUri = $_SERVER["\122\x45\121\125\105\123\x54\x5f\x55\x52\111"]; goto a7327d1c289fa079; e80701692e6e2e68: header("\114\x6f\143\x61\164\151\x6f\156\x3a\x20\x2f\x73\145\164\x75\160\57"); goto b28a9a5b9545adcd; E0b8cfc8d863f7d6: $context = stream_context_create($options); goto C7953174d1c96f1c; A5ca4daea401e94f: $user_context = stream_context_create(array("\x68\x74\x74\160" => array("\x68\145\x61\144\145\162" => $user_headers))); goto D75952b77b1262ee; cd7da1252f647f27: try { goto Ac145f3d8d7947b1; F06d92578fdabb7e: $debugSetting = $DEBUG["\x64\x65\142\x75\x67"]; goto d6d11ac2c17016c1; d6d11ac2c17016c1: $developmentSetting = $DEBUG["\x64\145\166\145\154\157\160\x6d\145\156\164"]; goto a9965c034f6b8960; a9965c034f6b8960: $generatorUsernameSetting = $DEBUG["\147\145\x6e\145\162\x61\164\x6f\x72\x75\163\x65\x72\156\x61\155\145"]; goto D109785ad3a015db; Ac145f3d8d7947b1: global $debugSetting, $developmentSetting, $generatorUsernameSetting; goto F06d92578fdabb7e; D109785ad3a015db: } catch (Exception $e) { echo "\x45\170\x63\x65\160\x74\151\157\156\x20\x63\x61\x75\x67\x68\164\72\40" . $e->getMessage(); } goto A95f0d18b7a82acd; Ec8e50c21a0dbade: $code = $_GET["\143\157\x64\x65"]; goto E8c21a42186fe479; A5865f37894dbb1d: echo "\124\x65\155\160\x6c\141\x74\145\x20\120\x61\164\150\x3a\x20{$templatePath}\74\x62\x72\76"; goto ad6b2853aa1c097a; ad6b2853aa1c097a: echo "\103\x6f\162\145\x20\x50\141\x67\x65\40\120\x61\x74\x68\72\x20{$corePagePath}\74\x62\x72\76"; goto bd983c016f3720ee; Ff42b36fb3826d5b: $page = isset($uriSegments[0]) && $uriSegments[0] !== '' ? $uriSegments[0] : "\151\x6e\x64\x65\x78"; goto fa52f441e9f5e447; ed8377203fa441e7: if (file_exists($corePagePath)) { goto d0f893530d35d2df; } goto ddf3881f92d51b14; fa52f441e9f5e447: if (!isset($_GET["\x63\157\x64\145"])) { goto B676298d6a4abab8; } goto dd79d9631c4a97c3; F0782bb45f631f8c: goto fbb8b51c3d3a124e; goto B1cd108b0f747655; F322d5ebdc136277: goto fbb8b51c3d3a124e; goto c84d809d80b842e3; de785ce246074672: session_start(); goto E869089f284f3037; Cf3c59cd4b074af8: include db25229056b8d5fc . "\x69\x6e\x63\57\x68\x65\141\x64\x65\x72\56\x70\150\x70"; goto a7c8d1911aa88f54; f5b17596ce4b8459: $templatePath = __DIR__ . "\57\164\x65\155\x70\x6c\x61\x74\145\x73\x2f{$template}\57\160\141\147\145\163\57{$page}\56\x70\x68\x70"; goto B3a6ec45565d2efa; c6fb5ee38e04e414: $user_url = "\x68\164\x74\160\x73\x3a\57\57\x64\x69\x73\143\x6f\162\144\56\x63\x6f\155\57\141\160\x69\x2f\x75\x73\x65\162\163\x2f\100\155\x65"; goto c8fd0f11ca0953ae; cfbcf8187ce3196c: $_SESSION["\x75\x73\145\x72\137\144\141\164\141"] = $user_data; goto b77aba4323b0bb06; Ac3702eabb30c34b: $user_data = json_decode($user_response, true); goto cfbcf8187ce3196c; a5797894935fa82c: cdfe8032b8298878: goto e80701692e6e2e68; e83826239b182624: require_once $_SERVER["\104\x4f\103\125\115\105\116\124\137\x52\117\117\124"] . "\x2f\x63\157\x72\145\x2f\143\x6f\x6e\x66\x69\x67\x73\57\x63\157\x6e\x66\x69\147\x2e\151\x6e\x63\x2e\160\x68\x70"; goto d5e269d63dd45ba7; ddf3881f92d51b14: echo "\x34\60\x34\40\55\x20\x50\141\x67\x65\x20\116\x6f\x74\40\x46\157\165\x6e\x64"; goto F0782bb45f631f8c; a7327d1c289fa079: $uriSegments = explode("\x2f", trim($requestUri, "\57")); goto Ff42b36fb3826d5b; eafa012ba59e8e2f: require_once $_SERVER["\104\x4f\103\125\x4d\105\116\124\x5f\122\x4f\117\124"] . "\57\x63\x6f\x72\x65\57\151\x6e\x63\x2f\164\145\x6d\x70\154\141\164\x65\56\x70\x68\160"; goto e83826239b182624; b77aba4323b0bb06: header("\114\x6f\x63\x61\164\151\157\156\x3a\40\x2f\143\x6f\162\x65\x2f\141\165\164\150\57\x64\151\x73\143\157\162\144\x2f\x6c\157\147\x69\x6e\x2e\x70\x68\x70"); goto aa058026e0f3de66; D75952b77b1262ee: $user_response = file_get_contents($user_url, false, $user_context); goto Ac3702eabb30c34b; Aee7d16575b6c509: echo "\124\x65\x6d\x70\154\x61\x74\145\x3a\40{$template}\x3c\x62\162\x3e"; goto A5865f37894dbb1d; F1ae6003b65e8c09: $data = array("\143\x6c\151\145\x6e\164\x5f\151\144" => $clientId, "\143\154\x69\145\156\x74\137\163\145\x63\x72\x65\164" => $client_secret, "\x67\162\x61\x6e\x74\x5f\164\x79\160\x65" => "\x61\165\x74\x68\x6f\x72\151\172\141\164\151\157\x6e\x5f\143\157\144\x65", "\143\x6f\144\x65" => $code, "\162\145\x64\x69\162\145\x63\164\x5f\165\x72\x69" => $redirectUri); goto da0d02e22511364a; A81718ef9c919a55: ae91acc4c914b468: goto eac8f17dfe7f991a; E869089f284f3037: $configFile = "\143\x6f\x72\145\x2f\143\x6f\x6e\x66\x69\x67\163\x2f\143\157\156\x66\151\x67\x2e\x69\156\x63\x2e\x70\x68\x70"; goto cad6a56eac87ccae; c8fd0f11ca0953ae: $user_headers = array("\101\165\164\x68\157\162\151\x7a\141\164\x69\157\156\x3a\40\102\x65\x61\x72\x65\x72\40" . $access_token); goto A5ca4daea401e94f; Eafca7b2f84fb285: fbb8b51c3d3a124e: ?>

Function Calls

None

Variables

None

Stats

MD5 7ff7974a7ac9ee7a54803872057be365
Eval Count 0
Decode Time 63 ms