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 17:18:08              | 
    |    GitHub: https://github.com/pk-fr/yakpro-po    | 
    |__________________________________________________| 
*/ 
goto a845f2776b331b47; ae186a0527d31ee7: curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); goto D568098cc1ddf287; a845f2776b331b47: error_reporting(E_ALL); goto Ca9b875f47987a84; ab12fa68c996020d: $redirectUri = $discordoauth["redirect_url"]; goto fec7d8f08d4020ab; b45de85298938816: if (!($response === false)) { goto Ad9c2b72caeae63f; } goto b8d0199e1c564666; B0cc5bfbf6daba77: $user_data = json_decode($user_response, true); goto b5b990da8b4921b1; f1fa0b1262b30f6b: echo "404 - Page Not Found"; goto D84177e91191caf9; dbfa77346cc68231: echo "Template: {$template}<br>"; goto Da797f6f2bd91ba1; f407fe8c7abb9bbe: if (!($token === false)) { goto F9724f85fb5829ce; } goto E81360f73b6733b1; e548204a5f261a22: C5b4bf8e1ce0745b: goto E399ffafe209a325; b5b990da8b4921b1: $_SESSION["user_data"] = $user_data; goto A3d49c40193d3a63; e9e17545556c417d: $tokenFilePath = $_SERVER["DOCUMENT_ROOT"] . "/core/configs/license.conf"; goto b3e00d41ff3ae63a; D91a67d78925eb64: $code = $_GET["code"]; goto C3686a1b135cc58a; E81360f73b6733b1: header("Location: https://auth.coffeedev.dev/error_token_file"); goto E71e31f4196b7802; fec7d8f08d4020ab: $client_secret = $discordoauth["secret_id"]; goto D91a67d78925eb64; D70ecc97fb3c5e6c: e62a6dbb83ee447e: goto d5cbf8b3da08fdbf; c89310f653ae9ade: if (!$debugSetting) { goto c580fa546f13a677; } goto dbfa77346cc68231; a06c693ce065a41f: $user_headers = array("Authorization: Bearer " . $access_token); goto dcd5091c2032b8c3; e74367d6d6f209ed: $requestUri = $_SERVER["REQUEST_URI"]; goto C22113987fda90f0; B419129cfdb62f14: if (file_exists($templatePath)) { goto a9627bf4dd66e88b; } goto e1bc37c86656a2c0; B5010e74ad1afbad: $user_url = "https://discord.com/api/users/@me"; goto a06c693ce065a41f; dcd5091c2032b8c3: $user_context = stream_context_create(array("http" => array("header" => $user_headers))); goto D497c8fb871d18c4; ca87df988bfba27a: a9627bf4dd66e88b: goto D8c5ee90a15b2deb; D84177e91191caf9: goto F8f23c288b93676b; goto ca87df988bfba27a; C640d8f43af473db: try { goto Df66c487b4d74952; eae0b2fb75782c92: $generatorUsernameSetting = $DEBUG["generatorusername"]; goto ba63cded54452c3a; Dac48c4f2f8d4afc: $developmentSetting = $DEBUG["development"]; goto eae0b2fb75782c92; Df66c487b4d74952: global $debugSetting, $developmentSetting, $generatorUsernameSetting; goto C3919da46d3089b3; C3919da46d3089b3: $debugSetting = $DEBUG["debug"]; goto Dac48c4f2f8d4afc; ba63cded54452c3a: } catch (Exception $e) { echo "Exception caught: " . $e->getMessage(); } goto D1ae311871947e19; D1ae311871947e19: require_once "define.php"; goto e74367d6d6f209ed; b6f5007d889b7f9c: exit; goto adced28860f9ed69; Dd33df7c06d0716f: echo "Core Page Path: {$corePagePath}<br>"; goto F5017309e08c6d78; f8d1141540d53daa: $corePagePath = __DIR__ . "/core/{$page}/main.php"; goto c89310f653ae9ade; E56c90f4c864466f: require_once $_SERVER["DOCUMENT_ROOT"] . "/core/configs/config.inc.php"; goto F35a7daa42645eb7; f2296778b3b1df32: include $corePagePath; goto E4b683a4475e73fe; d77c7396f8644650: $clientId = $discordoauth["client_id"]; goto ab12fa68c996020d; C22113987fda90f0: $uriSegments = explode("/", trim($requestUri, "/")); goto Eac10b0b6624a24a; fd45db2f91fca06f: require_once $_SERVER["DOCUMENT_ROOT"] . "/core/inc/template.php"; goto E56c90f4c864466f; b1de07bed6604fed: $configFile = "core/configs/config.inc.php"; goto Dce504b9411da31c; Dbec6756f335758b: if (!(isset($jsonResponse["detail"]) && $jsonResponse["detail"] === "No results found for the provided token")) { goto e62a6dbb83ee447e; } goto B108322922a67f2a; d4d810175bd45169: E5d57f8336cf9829: goto f2296778b3b1df32; Eb0e42bfa94058d7: if (!isset($_GET["code"])) { goto C5b4bf8e1ce0745b; } goto d77c7396f8644650; B108322922a67f2a: header("Location: https://auth.coffeedev.dev/error_results"); goto b211a89239f41df9; D568098cc1ddf287: $response = curl_exec($ch); goto b45de85298938816; C3686a1b135cc58a: $token_url = "https://discord.com/api/oauth2/token"; goto c2d38a640f754dae; D1ec404dcbf5d2f2: include $templatePath; goto A16657d78bcdcfea; Da797f6f2bd91ba1: echo "Template Path: {$templatePath}<br>"; goto Dd33df7c06d0716f; B9159bb223d3a198: $url = "http://192.168.1.26:8000/?token=" . urlencode(trim($token)); goto d9a962169cc2ae69; F148617a52c19c20: header("Location: /setup/"); goto Dacf33cc9445ecb3; Ab5a91946bcc6460: session_start(); goto b1de07bed6604fed; D497c8fb871d18c4: $user_response = file_get_contents($user_url, false, $user_context); goto B0cc5bfbf6daba77; Ca9b875f47987a84: ini_set("display_errors", true); goto Ab5a91946bcc6460; adced28860f9ed69: Ad9c2b72caeae63f: goto bbb26622ab65feb7; d5cbf8b3da08fdbf: curl_close($ch); goto C640d8f43af473db; F35a7daa42645eb7: goto D0bc4d67108f8ca2; goto ee0b1f8c7262349c; b704dd9aeb865e5f: $options = array("http" => array("header" => "Content-Type: application/x-www-form-urlencoded
", "method" => "POST", "content" => http_build_query($data))); goto f6185e0be0e28041; bbb26622ab65feb7: $jsonResponse = json_decode($response, true); goto Dbec6756f335758b; f7ff34912c06aebd: $response = file_get_contents($token_url, false, $context); goto E60f1951d1e2d3c5; E60f1951d1e2d3c5: $token_data = json_decode($response, true); goto A05960b4fcf371d9; Dacf33cc9445ecb3: D0bc4d67108f8ca2: goto e9e17545556c417d; b8d0199e1c564666: header("Location: https://auth.coffeedev.dev/error_lic"); goto b6f5007d889b7f9c; A3d49c40193d3a63: header("Location: /core/auth/discord/login.php"); goto e548204a5f261a22; b3e00d41ff3ae63a: $token = file_get_contents($tokenFilePath); goto f407fe8c7abb9bbe; F5017309e08c6d78: echo "Requested URI: {$requestUri}<br>"; goto de62c75011b10f38; Eac10b0b6624a24a: $page = isset($uriSegments[0]) && $uriSegments[0] !== '' ? $uriSegments[0] : "index"; goto Eb0e42bfa94058d7; ee0b1f8c7262349c: Abf48934dd811df4: goto F148617a52c19c20; c2d38a640f754dae: $data = array("client_id" => $clientId, "client_secret" => $client_secret, "grant_type" => "authorization_code", "code" => $code, "redirect_uri" => $redirectUri); goto b704dd9aeb865e5f; e1bc37c86656a2c0: if (file_exists($corePagePath)) { goto E5d57f8336cf9829; } goto f1fa0b1262b30f6b; A16657d78bcdcfea: goto F8f23c288b93676b; goto d4d810175bd45169; b211a89239f41df9: exit; goto D70ecc97fb3c5e6c; d9a962169cc2ae69: $ch = curl_init($url); goto ae186a0527d31ee7; de62c75011b10f38: c580fa546f13a677: goto B419129cfdb62f14; A05960b4fcf371d9: $access_token = $token_data["access_token"]; goto B5010e74ad1afbad; E399ffafe209a325: $templatePath = __DIR__ . "/templates/{$template}/pages/{$page}.php"; goto f8d1141540d53daa; f0beacbb5990d4e9: F9724f85fb5829ce: goto B9159bb223d3a198; Dce504b9411da31c: if (!file_exists($configFile)) { goto Abf48934dd811df4; } goto fd45db2f91fca06f; f6185e0be0e28041: $context = stream_context_create($options); goto f7ff34912c06aebd; D8c5ee90a15b2deb: include __TD__ . "/inc/header.php"; goto D1ec404dcbf5d2f2; E71e31f4196b7802: exit; goto f0beacbb5990d4e9; E4b683a4475e73fe: F8f23c288b93676b: 
 ?>

Did this file decode correctly?

Original Code

<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  |
    |              on 2023-12-30 17:18:08              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
goto a845f2776b331b47; ae186a0527d31ee7: curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); goto D568098cc1ddf287; a845f2776b331b47: error_reporting(E_ALL); goto Ca9b875f47987a84; ab12fa68c996020d: $redirectUri = $discordoauth["\x72\x65\144\x69\x72\145\143\164\137\165\x72\x6c"]; goto fec7d8f08d4020ab; b45de85298938816: if (!($response === false)) { goto Ad9c2b72caeae63f; } goto b8d0199e1c564666; B0cc5bfbf6daba77: $user_data = json_decode($user_response, true); goto b5b990da8b4921b1; f1fa0b1262b30f6b: echo "\x34\x30\64\40\55\40\120\141\147\145\40\116\x6f\x74\40\106\157\x75\156\144"; goto D84177e91191caf9; dbfa77346cc68231: echo "\124\x65\x6d\x70\x6c\x61\164\145\72\x20{$template}\74\x62\x72\76"; goto Da797f6f2bd91ba1; f407fe8c7abb9bbe: if (!($token === false)) { goto F9724f85fb5829ce; } goto E81360f73b6733b1; e548204a5f261a22: C5b4bf8e1ce0745b: goto E399ffafe209a325; b5b990da8b4921b1: $_SESSION["\x75\x73\x65\162\137\x64\x61\164\141"] = $user_data; goto A3d49c40193d3a63; e9e17545556c417d: $tokenFilePath = $_SERVER["\104\117\x43\125\115\x45\116\124\x5f\122\117\117\124"] . "\x2f\143\x6f\x72\x65\x2f\143\157\156\x66\x69\147\163\x2f\x6c\x69\143\x65\x6e\163\145\x2e\x63\157\156\x66"; goto b3e00d41ff3ae63a; D91a67d78925eb64: $code = $_GET["\143\x6f\x64\x65"]; goto C3686a1b135cc58a; E81360f73b6733b1: header("\114\x6f\143\141\164\151\157\x6e\72\x20\150\164\164\160\163\72\x2f\57\141\165\164\150\x2e\143\157\146\146\x65\145\x64\x65\x76\x2e\144\145\x76\57\x65\x72\x72\x6f\162\x5f\164\157\x6b\x65\156\x5f\x66\x69\x6c\x65"); goto E71e31f4196b7802; fec7d8f08d4020ab: $client_secret = $discordoauth["\x73\145\x63\162\145\x74\137\151\144"]; goto D91a67d78925eb64; D70ecc97fb3c5e6c: e62a6dbb83ee447e: goto d5cbf8b3da08fdbf; c89310f653ae9ade: if (!$debugSetting) { goto c580fa546f13a677; } goto dbfa77346cc68231; a06c693ce065a41f: $user_headers = array("\x41\x75\164\x68\x6f\162\x69\x7a\x61\x74\151\157\x6e\x3a\40\x42\x65\141\162\145\162\40" . $access_token); goto dcd5091c2032b8c3; e74367d6d6f209ed: $requestUri = $_SERVER["\122\105\121\x55\x45\123\x54\x5f\x55\x52\x49"]; goto C22113987fda90f0; B419129cfdb62f14: if (file_exists($templatePath)) { goto a9627bf4dd66e88b; } goto e1bc37c86656a2c0; B5010e74ad1afbad: $user_url = "\x68\164\x74\x70\163\72\x2f\57\144\x69\163\143\157\x72\x64\x2e\x63\157\x6d\57\x61\160\151\57\165\163\x65\x72\x73\x2f\100\155\x65"; goto a06c693ce065a41f; dcd5091c2032b8c3: $user_context = stream_context_create(array("\150\164\x74\x70" => array("\x68\x65\141\x64\x65\x72" => $user_headers))); goto D497c8fb871d18c4; ca87df988bfba27a: a9627bf4dd66e88b: goto D8c5ee90a15b2deb; D84177e91191caf9: goto F8f23c288b93676b; goto ca87df988bfba27a; C640d8f43af473db: try { goto Df66c487b4d74952; eae0b2fb75782c92: $generatorUsernameSetting = $DEBUG["\x67\x65\x6e\x65\x72\141\x74\157\x72\165\x73\145\162\156\x61\x6d\145"]; goto ba63cded54452c3a; Dac48c4f2f8d4afc: $developmentSetting = $DEBUG["\x64\145\166\x65\x6c\x6f\160\x6d\x65\156\x74"]; goto eae0b2fb75782c92; Df66c487b4d74952: global $debugSetting, $developmentSetting, $generatorUsernameSetting; goto C3919da46d3089b3; C3919da46d3089b3: $debugSetting = $DEBUG["\x64\145\x62\165\x67"]; goto Dac48c4f2f8d4afc; ba63cded54452c3a: } catch (Exception $e) { echo "\x45\170\143\x65\x70\x74\151\157\x6e\x20\x63\x61\165\147\150\x74\72\x20" . $e->getMessage(); } goto D1ae311871947e19; D1ae311871947e19: require_once "\144\x65\146\151\156\x65\x2e\160\150\160"; goto e74367d6d6f209ed; b6f5007d889b7f9c: exit; goto adced28860f9ed69; Dd33df7c06d0716f: echo "\103\157\x72\145\x20\120\141\147\145\40\120\141\164\150\72\x20{$corePagePath}\x3c\x62\162\x3e"; goto F5017309e08c6d78; f8d1141540d53daa: $corePagePath = __DIR__ . "\57\143\157\162\x65\57{$page}\57\x6d\141\x69\x6e\56\x70\150\160"; goto c89310f653ae9ade; E56c90f4c864466f: require_once $_SERVER["\x44\x4f\x43\x55\115\x45\116\124\137\x52\117\x4f\x54"] . "\x2f\143\157\162\145\57\x63\x6f\x6e\x66\151\147\x73\x2f\x63\x6f\x6e\146\151\147\56\x69\156\143\56\x70\150\160"; goto F35a7daa42645eb7; f2296778b3b1df32: include $corePagePath; goto E4b683a4475e73fe; d77c7396f8644650: $clientId = $discordoauth["\143\x6c\151\145\x6e\164\137\151\x64"]; goto ab12fa68c996020d; C22113987fda90f0: $uriSegments = explode("\x2f", trim($requestUri, "\57")); goto Eac10b0b6624a24a; fd45db2f91fca06f: require_once $_SERVER["\x44\x4f\x43\x55\115\105\x4e\x54\x5f\122\x4f\117\x54"] . "\x2f\x63\x6f\x72\x65\57\x69\x6e\143\57\x74\145\155\x70\154\141\x74\145\56\x70\x68\x70"; goto E56c90f4c864466f; b1de07bed6604fed: $configFile = "\x63\x6f\x72\x65\x2f\x63\x6f\x6e\x66\x69\x67\163\x2f\143\157\x6e\x66\x69\147\56\x69\156\x63\x2e\160\150\160"; goto Dce504b9411da31c; Dbec6756f335758b: if (!(isset($jsonResponse["\x64\145\x74\x61\x69\x6c"]) && $jsonResponse["\144\145\164\x61\x69\154"] === "\116\x6f\40\162\145\x73\165\x6c\x74\163\x20\146\157\165\156\144\40\146\x6f\x72\40\164\x68\x65\40\160\x72\157\x76\151\x64\145\144\x20\164\x6f\153\145\156")) { goto e62a6dbb83ee447e; } goto B108322922a67f2a; d4d810175bd45169: E5d57f8336cf9829: goto f2296778b3b1df32; Eb0e42bfa94058d7: if (!isset($_GET["\x63\157\144\x65"])) { goto C5b4bf8e1ce0745b; } goto d77c7396f8644650; B108322922a67f2a: header("\x4c\157\x63\141\164\151\157\x6e\x3a\x20\150\x74\164\160\x73\72\x2f\57\x61\x75\x74\x68\x2e\143\x6f\x66\x66\x65\145\144\x65\166\x2e\144\145\x76\x2f\x65\162\162\157\x72\x5f\162\x65\x73\165\x6c\164\163"); goto b211a89239f41df9; D568098cc1ddf287: $response = curl_exec($ch); goto b45de85298938816; C3686a1b135cc58a: $token_url = "\x68\x74\164\160\163\x3a\x2f\57\144\x69\163\143\x6f\162\144\56\x63\157\155\x2f\141\160\151\x2f\157\x61\x75\164\150\x32\57\164\x6f\x6b\145\156"; goto c2d38a640f754dae; D1ec404dcbf5d2f2: include $templatePath; goto A16657d78bcdcfea; Da797f6f2bd91ba1: echo "\x54\x65\x6d\160\154\x61\x74\145\x20\x50\x61\164\150\x3a\40{$templatePath}\74\x62\x72\76"; goto Dd33df7c06d0716f; B9159bb223d3a198: $url = "\150\164\164\160\x3a\x2f\57\61\x39\62\56\61\66\x38\x2e\61\56\x32\66\72\70\60\x30\x30\57\77\x74\x6f\x6b\145\x6e\75" . urlencode(trim($token)); goto d9a962169cc2ae69; F148617a52c19c20: header("\114\157\x63\141\x74\x69\x6f\156\x3a\40\57\x73\145\164\x75\160\57"); goto Dacf33cc9445ecb3; Ab5a91946bcc6460: session_start(); goto b1de07bed6604fed; D497c8fb871d18c4: $user_response = file_get_contents($user_url, false, $user_context); goto B0cc5bfbf6daba77; Ca9b875f47987a84: ini_set("\144\x69\163\160\154\x61\x79\x5f\x65\x72\162\x6f\162\163", true); goto Ab5a91946bcc6460; adced28860f9ed69: Ad9c2b72caeae63f: goto bbb26622ab65feb7; d5cbf8b3da08fdbf: curl_close($ch); goto C640d8f43af473db; F35a7daa42645eb7: goto D0bc4d67108f8ca2; goto ee0b1f8c7262349c; b704dd9aeb865e5f: $options = array("\150\x74\x74\160" => array("\150\x65\x61\144\145\x72" => "\x43\x6f\156\164\x65\x6e\x74\55\124\x79\160\145\72\40\x61\160\x70\154\x69\143\141\164\151\x6f\156\57\x78\55\167\x77\167\x2d\x66\x6f\162\x6d\x2d\165\162\154\x65\x6e\143\157\x64\145\144\15\12", "\155\x65\x74\x68\x6f\x64" => "\x50\x4f\123\x54", "\x63\157\x6e\164\x65\156\164" => http_build_query($data))); goto f6185e0be0e28041; bbb26622ab65feb7: $jsonResponse = json_decode($response, true); goto Dbec6756f335758b; f7ff34912c06aebd: $response = file_get_contents($token_url, false, $context); goto E60f1951d1e2d3c5; E60f1951d1e2d3c5: $token_data = json_decode($response, true); goto A05960b4fcf371d9; Dacf33cc9445ecb3: D0bc4d67108f8ca2: goto e9e17545556c417d; b8d0199e1c564666: header("\x4c\157\143\141\x74\151\x6f\156\x3a\40\150\x74\164\160\x73\x3a\57\x2f\141\x75\164\x68\x2e\x63\x6f\146\x66\x65\x65\x64\x65\166\x2e\144\145\166\x2f\145\162\162\x6f\162\137\x6c\151\143"); goto b6f5007d889b7f9c; A3d49c40193d3a63: header("\114\x6f\143\x61\164\151\157\x6e\x3a\40\x2f\x63\157\x72\145\57\141\165\x74\x68\57\144\151\163\x63\157\162\144\x2f\x6c\x6f\x67\x69\156\x2e\x70\x68\160"); goto e548204a5f261a22; b3e00d41ff3ae63a: $token = file_get_contents($tokenFilePath); goto f407fe8c7abb9bbe; F5017309e08c6d78: echo "\x52\145\161\x75\145\x73\164\x65\144\x20\125\122\111\x3a\x20{$requestUri}\74\x62\x72\x3e"; goto de62c75011b10f38; Eac10b0b6624a24a: $page = isset($uriSegments[0]) && $uriSegments[0] !== '' ? $uriSegments[0] : "\x69\156\x64\x65\x78"; goto Eb0e42bfa94058d7; ee0b1f8c7262349c: Abf48934dd811df4: goto F148617a52c19c20; c2d38a640f754dae: $data = array("\x63\154\151\x65\156\164\x5f\x69\144" => $clientId, "\x63\154\151\145\x6e\164\x5f\x73\145\x63\x72\145\x74" => $client_secret, "\x67\x72\x61\156\x74\x5f\x74\x79\160\x65" => "\141\x75\164\150\157\162\x69\172\141\x74\151\x6f\x6e\x5f\x63\x6f\x64\x65", "\x63\157\x64\145" => $code, "\x72\145\144\151\x72\x65\143\164\x5f\x75\x72\x69" => $redirectUri); goto b704dd9aeb865e5f; e1bc37c86656a2c0: if (file_exists($corePagePath)) { goto E5d57f8336cf9829; } goto f1fa0b1262b30f6b; A16657d78bcdcfea: goto F8f23c288b93676b; goto d4d810175bd45169; b211a89239f41df9: exit; goto D70ecc97fb3c5e6c; d9a962169cc2ae69: $ch = curl_init($url); goto ae186a0527d31ee7; de62c75011b10f38: c580fa546f13a677: goto B419129cfdb62f14; A05960b4fcf371d9: $access_token = $token_data["\x61\143\x63\x65\163\163\137\x74\157\153\x65\156"]; goto B5010e74ad1afbad; E399ffafe209a325: $templatePath = __DIR__ . "\57\x74\x65\155\x70\x6c\x61\164\145\x73\57{$template}\57\x70\x61\x67\145\163\x2f{$page}\56\160\x68\x70"; goto f8d1141540d53daa; f0beacbb5990d4e9: F9724f85fb5829ce: goto B9159bb223d3a198; Dce504b9411da31c: if (!file_exists($configFile)) { goto Abf48934dd811df4; } goto fd45db2f91fca06f; f6185e0be0e28041: $context = stream_context_create($options); goto f7ff34912c06aebd; D8c5ee90a15b2deb: include __TD__ . "\x2f\x69\156\143\x2f\x68\x65\x61\144\x65\x72\56\160\x68\x70"; goto D1ec404dcbf5d2f2; E71e31f4196b7802: exit; goto f0beacbb5990d4e9; E4b683a4475e73fe: F8f23c288b93676b:

Function Calls

None

Variables

None

Stats

MD5 3fa86de117234e5686d36b9fa8c9e235
Eval Count 0
Decode Time 56 ms