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 12:07:19              | 
    |    GitHub: https://github.com/pk-fr/yakpro-po    | 
    |__________________________________________________| 
*/ 
goto D0d25135a9587a21; Cff9aee3b16cf989: if (!$debugSetting) { goto C6c4781cbff6577f; } goto cc4a85fd1bf76ac5; F824963fcaae837b: $requestUri = $_SERVER["REQUEST_URI"]; goto D938e40f4fd62476; B881b878681e74d2: D62233947b78c996: goto D1e1fc188f8ef6b4; E0663d4ab3a17afa: $options = array("http" => array("header" => "Content-Type: application/x-www-form-urlencoded
\xa", "method" => "POST", "content" => http_build_query($data))); goto b8e6a3cf7e42cfa0; E2a6b21ff45f0f97: C6c4781cbff6577f: goto C7ddda8fb514ce10; C7ddda8fb514ce10: if (file_exists($templatePath)) { goto f121d8bf538fdfa3; } goto f925b2aeb6fc80bd; aaa2fb758b10b1ee: include C137d13444ab495c . "inc/header.php"; goto C6f0c20e508d2ae3; Db1028b306d31d7b: try { goto D01d16792ced5555; D01d16792ced5555: global $debugSetting, $developmentSetting, $generatorUsernameSetting; goto b3e509a18067502e; E4a477e1632d77d6: $developmentSetting = $DEBUG["development"]; goto F4840a229ed9821a; b3e509a18067502e: $debugSetting = $DEBUG["debug"]; goto E4a477e1632d77d6; F4840a229ed9821a: $generatorUsernameSetting = $DEBUG["generatorusername"]; goto fa9634f5817930ae; fa9634f5817930ae: } catch (Exception $e) { echo "Exception caught: " . $e->getMessage(); } goto bd375b93f61f7d63; Ceee73de7970dade: $user_url = "https://discord.com/api/users/@me"; goto ea98068cad87eec0; C5e0793ab8dee052: echo "Core Page Path: {$corePagePath}<br>"; goto f22079b355379f53; cedf8705aa102e62: $redirectUri = $discordoauth["redirect_url"]; goto E54e5f48b5d335dc; eea9e91e352b7802: $user_data = json_decode($user_response, true); goto A4c3712843f7fb51; Ba782c042a5bde8f: echo "404 - Page Not Found"; goto ac5a450e47e386da; A4c3712843f7fb51: $_SESSION["user_data"] = $user_data; goto d97455662297f889; f925b2aeb6fc80bd: if (file_exists($corePagePath)) { goto D62233947b78c996; } goto Ba782c042a5bde8f; bd375b93f61f7d63: require_once "define.php"; goto F824963fcaae837b; A23f488987b27816: require_once $_SERVER["DOCUMENT_ROOT"] . "/core/configs/config.inc.php"; goto B3e8aa728254a3b9; C9fb3bd6c0c67556: $token_data = json_decode($response, true); goto f59e79cb645b6654; f22079b355379f53: echo "Requested URI: {$requestUri}<br>"; goto E2a6b21ff45f0f97; b8e6a3cf7e42cfa0: $context = stream_context_create($options); goto Bb745ca10037a175; beb2bdc265ce3cd7: $data = array("client_id" => $clientId, "client_secret" => $client_secret, "grant_type" => "authorization_code", "code" => $code, "redirect_uri" => $redirectUri); goto E0663d4ab3a17afa; cc4a85fd1bf76ac5: echo "Template: {$template}<br>"; goto Cad51b6fc5b30eb4; d97455662297f889: header("Location: /core/auth/discord/login.php"); goto ade2cb7d11d8c6ee; Bce8e96166b1fb15: require_once $_SERVER["DOCUMENT_ROOT"] . "/core/inc/template.php"; goto A23f488987b27816; B45efd4c6f3c189c: $user_response = file_get_contents($user_url, false, $user_context); goto eea9e91e352b7802; edfe178f3d2d3031: $page = isset($uriSegments[0]) && $uriSegments[0] !== '' ? $uriSegments[0] : "index"; goto A8c1e0e3d86bb2cd; e3ad72b292ab474f: f121d8bf538fdfa3: goto aaa2fb758b10b1ee; C4cbda8a198e6593: $templatePath = __DIR__ . "/templates/{$template}/pages/{$page}.php"; goto Ed873c699f9b2ea4; dbe3538919cf548c: $token_url = "https://discord.com/api/oauth2/token"; goto beb2bdc265ce3cd7; Cad51b6fc5b30eb4: echo "Template Path: {$templatePath}<br>"; goto C5e0793ab8dee052; D0d25135a9587a21: session_start(); goto F6400c9d07815a54; F6400c9d07815a54: $configFile = "core/configs/config.inc.php"; goto B129e217499f0de0; cd0675656f8e49cb: A9f25916da887c61: goto Db1028b306d31d7b; bae245caa3df6c4b: $clientId = $discordoauth["client_id"]; goto cedf8705aa102e62; Ed873c699f9b2ea4: $corePagePath = __DIR__ . "/core/{$page}/main.php"; goto Cff9aee3b16cf989; ade2cb7d11d8c6ee: c6e6719cd5ab4e14: goto C4cbda8a198e6593; Bb745ca10037a175: $response = file_get_contents($token_url, false, $context); goto C9fb3bd6c0c67556; d21a521c874a1ed7: $code = $_GET["code"]; goto dbe3538919cf548c; E54e5f48b5d335dc: $client_secret = $discordoauth["secret_id"]; goto d21a521c874a1ed7; B129e217499f0de0: if (!file_exists($configFile)) { goto e223984307c5c339; } goto Bce8e96166b1fb15; D938e40f4fd62476: $uriSegments = explode("/", trim($requestUri, "/")); goto edfe178f3d2d3031; ac5a450e47e386da: goto E6b2b1cd37c1a6e1; goto e3ad72b292ab474f; Faeefde6514d0b15: $user_context = stream_context_create(array("http" => array("header" => $user_headers))); goto B45efd4c6f3c189c; ea98068cad87eec0: $user_headers = array("Authorization: Bearer " . $access_token); goto Faeefde6514d0b15; f59e79cb645b6654: $access_token = $token_data["access_token"]; goto Ceee73de7970dade; A8c1e0e3d86bb2cd: if (!isset($_GET["code"])) { goto c6e6719cd5ab4e14; } goto bae245caa3df6c4b; E52eade20fc8f66f: goto E6b2b1cd37c1a6e1; goto B881b878681e74d2; B3e8aa728254a3b9: goto A9f25916da887c61; goto C609865e7cfed98c; C609865e7cfed98c: e223984307c5c339: goto D21ce2153847a9a1; C6f0c20e508d2ae3: include $templatePath; goto E52eade20fc8f66f; D1e1fc188f8ef6b4: include $corePagePath; goto f8ec6f245fa74074; D21ce2153847a9a1: header("Location: /setup/"); goto cd0675656f8e49cb; f8ec6f245fa74074: E6b2b1cd37c1a6e1: ?>

Did this file decode correctly?

Original Code

<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  |
    |              on 2023-12-30 12:07:19              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
goto D0d25135a9587a21; Cff9aee3b16cf989: if (!$debugSetting) { goto C6c4781cbff6577f; } goto cc4a85fd1bf76ac5; F824963fcaae837b: $requestUri = $_SERVER["\x52\105\121\125\x45\x53\x54\x5f\125\x52\111"]; goto D938e40f4fd62476; B881b878681e74d2: D62233947b78c996: goto D1e1fc188f8ef6b4; E0663d4ab3a17afa: $options = array("\150\164\x74\x70" => array("\x68\x65\141\x64\145\x72" => "\x43\157\156\164\145\x6e\164\55\124\171\x70\145\x3a\x20\141\160\x70\x6c\x69\x63\141\164\151\x6f\156\57\170\55\x77\x77\x77\55\x66\x6f\162\x6d\x2d\165\x72\154\x65\x6e\143\157\x64\145\x64\15\xa", "\155\145\x74\150\157\x64" => "\x50\x4f\x53\124", "\x63\157\156\164\145\x6e\x74" => http_build_query($data))); goto b8e6a3cf7e42cfa0; E2a6b21ff45f0f97: C6c4781cbff6577f: goto C7ddda8fb514ce10; C7ddda8fb514ce10: if (file_exists($templatePath)) { goto f121d8bf538fdfa3; } goto f925b2aeb6fc80bd; aaa2fb758b10b1ee: include C137d13444ab495c . "\x69\x6e\x63\x2f\150\x65\141\x64\x65\162\x2e\160\150\x70"; goto C6f0c20e508d2ae3; Db1028b306d31d7b: try { goto D01d16792ced5555; D01d16792ced5555: global $debugSetting, $developmentSetting, $generatorUsernameSetting; goto b3e509a18067502e; E4a477e1632d77d6: $developmentSetting = $DEBUG["\144\145\166\145\x6c\x6f\x70\x6d\x65\x6e\x74"]; goto F4840a229ed9821a; b3e509a18067502e: $debugSetting = $DEBUG["\x64\145\142\165\x67"]; goto E4a477e1632d77d6; F4840a229ed9821a: $generatorUsernameSetting = $DEBUG["\x67\145\x6e\145\x72\141\164\x6f\162\165\x73\145\x72\156\x61\x6d\145"]; goto fa9634f5817930ae; fa9634f5817930ae: } catch (Exception $e) { echo "\105\170\143\x65\160\164\151\157\156\40\143\141\x75\147\150\164\x3a\40" . $e->getMessage(); } goto bd375b93f61f7d63; Ceee73de7970dade: $user_url = "\150\x74\164\160\163\x3a\x2f\x2f\144\x69\x73\143\x6f\x72\x64\x2e\x63\x6f\155\x2f\141\160\x69\57\165\163\145\x72\163\57\x40\x6d\x65"; goto ea98068cad87eec0; C5e0793ab8dee052: echo "\x43\x6f\162\145\x20\120\141\x67\x65\40\120\141\164\x68\72\40{$corePagePath}\74\x62\162\76"; goto f22079b355379f53; cedf8705aa102e62: $redirectUri = $discordoauth["\x72\x65\144\x69\162\145\x63\x74\x5f\x75\162\154"]; goto E54e5f48b5d335dc; eea9e91e352b7802: $user_data = json_decode($user_response, true); goto A4c3712843f7fb51; Ba782c042a5bde8f: echo "\x34\60\64\40\x2d\40\120\141\147\x65\40\x4e\x6f\164\40\106\x6f\165\156\144"; goto ac5a450e47e386da; A4c3712843f7fb51: $_SESSION["\165\x73\x65\162\137\144\141\164\x61"] = $user_data; goto d97455662297f889; f925b2aeb6fc80bd: if (file_exists($corePagePath)) { goto D62233947b78c996; } goto Ba782c042a5bde8f; bd375b93f61f7d63: require_once "\144\x65\x66\x69\x6e\145\56\x70\150\160"; goto F824963fcaae837b; A23f488987b27816: require_once $_SERVER["\104\117\103\x55\x4d\x45\x4e\124\137\x52\x4f\117\x54"] . "\57\x63\157\x72\145\57\143\157\156\146\151\147\163\x2f\x63\x6f\x6e\146\151\x67\56\151\156\x63\x2e\x70\150\160"; goto B3e8aa728254a3b9; C9fb3bd6c0c67556: $token_data = json_decode($response, true); goto f59e79cb645b6654; f22079b355379f53: echo "\x52\145\161\x75\x65\163\164\x65\x64\x20\125\122\x49\72\40{$requestUri}\74\142\162\76"; goto E2a6b21ff45f0f97; b8e6a3cf7e42cfa0: $context = stream_context_create($options); goto Bb745ca10037a175; beb2bdc265ce3cd7: $data = array("\143\154\151\145\x6e\x74\x5f\x69\x64" => $clientId, "\x63\x6c\x69\145\x6e\164\x5f\163\x65\143\162\x65\x74" => $client_secret, "\x67\x72\141\x6e\x74\137\164\x79\x70\x65" => "\x61\165\x74\150\157\162\151\172\x61\x74\x69\x6f\156\x5f\143\x6f\x64\x65", "\143\157\144\x65" => $code, "\162\x65\x64\151\162\x65\x63\164\137\x75\x72\x69" => $redirectUri); goto E0663d4ab3a17afa; cc4a85fd1bf76ac5: echo "\124\x65\155\160\x6c\x61\164\x65\x3a\40{$template}\74\142\162\76"; goto Cad51b6fc5b30eb4; d97455662297f889: header("\114\x6f\143\141\164\151\157\x6e\x3a\x20\57\143\x6f\x72\145\x2f\141\x75\x74\x68\x2f\x64\x69\163\143\x6f\162\x64\x2f\x6c\157\x67\151\156\56\x70\x68\x70"); goto ade2cb7d11d8c6ee; Bce8e96166b1fb15: require_once $_SERVER["\x44\117\x43\x55\115\105\x4e\x54\x5f\x52\117\117\x54"] . "\57\x63\157\162\x65\x2f\x69\x6e\x63\x2f\x74\x65\155\x70\x6c\x61\164\145\56\160\150\160"; goto A23f488987b27816; B45efd4c6f3c189c: $user_response = file_get_contents($user_url, false, $user_context); goto eea9e91e352b7802; edfe178f3d2d3031: $page = isset($uriSegments[0]) && $uriSegments[0] !== '' ? $uriSegments[0] : "\151\x6e\x64\145\x78"; goto A8c1e0e3d86bb2cd; e3ad72b292ab474f: f121d8bf538fdfa3: goto aaa2fb758b10b1ee; C4cbda8a198e6593: $templatePath = __DIR__ . "\x2f\x74\x65\155\x70\x6c\141\164\145\x73\57{$template}\57\x70\x61\x67\145\163\57{$page}\x2e\x70\150\160"; goto Ed873c699f9b2ea4; dbe3538919cf548c: $token_url = "\x68\164\x74\160\163\72\x2f\x2f\144\151\163\x63\x6f\x72\144\56\143\x6f\x6d\x2f\x61\x70\x69\57\x6f\141\x75\164\150\62\57\x74\x6f\153\145\156"; goto beb2bdc265ce3cd7; Cad51b6fc5b30eb4: echo "\x54\145\155\160\154\x61\x74\145\x20\x50\x61\164\x68\x3a\x20{$templatePath}\x3c\142\162\x3e"; goto C5e0793ab8dee052; D0d25135a9587a21: session_start(); goto F6400c9d07815a54; F6400c9d07815a54: $configFile = "\x63\x6f\162\145\x2f\x63\x6f\156\146\x69\x67\x73\57\x63\x6f\x6e\x66\151\147\x2e\151\x6e\143\x2e\160\x68\x70"; goto B129e217499f0de0; cd0675656f8e49cb: A9f25916da887c61: goto Db1028b306d31d7b; bae245caa3df6c4b: $clientId = $discordoauth["\143\x6c\151\145\x6e\164\x5f\x69\x64"]; goto cedf8705aa102e62; Ed873c699f9b2ea4: $corePagePath = __DIR__ . "\x2f\x63\x6f\x72\x65\57{$page}\x2f\155\141\x69\156\x2e\160\150\x70"; goto Cff9aee3b16cf989; ade2cb7d11d8c6ee: c6e6719cd5ab4e14: goto C4cbda8a198e6593; Bb745ca10037a175: $response = file_get_contents($token_url, false, $context); goto C9fb3bd6c0c67556; d21a521c874a1ed7: $code = $_GET["\143\x6f\144\145"]; goto dbe3538919cf548c; E54e5f48b5d335dc: $client_secret = $discordoauth["\163\145\143\x72\145\164\x5f\x69\144"]; goto d21a521c874a1ed7; B129e217499f0de0: if (!file_exists($configFile)) { goto e223984307c5c339; } goto Bce8e96166b1fb15; D938e40f4fd62476: $uriSegments = explode("\57", trim($requestUri, "\57")); goto edfe178f3d2d3031; ac5a450e47e386da: goto E6b2b1cd37c1a6e1; goto e3ad72b292ab474f; Faeefde6514d0b15: $user_context = stream_context_create(array("\150\x74\164\160" => array("\x68\145\x61\144\x65\x72" => $user_headers))); goto B45efd4c6f3c189c; ea98068cad87eec0: $user_headers = array("\101\x75\x74\x68\x6f\162\151\172\141\164\151\157\156\72\x20\x42\145\141\162\145\162\40" . $access_token); goto Faeefde6514d0b15; f59e79cb645b6654: $access_token = $token_data["\141\143\143\145\x73\163\x5f\164\x6f\x6b\145\x6e"]; goto Ceee73de7970dade; A8c1e0e3d86bb2cd: if (!isset($_GET["\x63\x6f\144\x65"])) { goto c6e6719cd5ab4e14; } goto bae245caa3df6c4b; E52eade20fc8f66f: goto E6b2b1cd37c1a6e1; goto B881b878681e74d2; B3e8aa728254a3b9: goto A9f25916da887c61; goto C609865e7cfed98c; C609865e7cfed98c: e223984307c5c339: goto D21ce2153847a9a1; C6f0c20e508d2ae3: include $templatePath; goto E52eade20fc8f66f; D1e1fc188f8ef6b4: include $corePagePath; goto f8ec6f245fa74074; D21ce2153847a9a1: header("\114\157\143\x61\164\151\157\156\72\40\57\163\x65\x74\165\x70\x2f"); goto cd0675656f8e49cb; f8ec6f245fa74074: E6b2b1cd37c1a6e1:

Function Calls

None

Variables

None

Stats

MD5 3b06e8e5fde86f5419f67efdca405376
Eval Count 0
Decode Time 91 ms