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 goto OVV1i; UD_cC: function get_pssh_from_data($data) { $pssh_header = pack("\103\..
Decoded Output download
<?php
goto OVV1i; UD_cC: function get_pssh_from_data($data) { $pssh_header = pack("C*", 112, 115, 115, 104); $output = array(); $dataLength = strlen($data); for ($count = 0; $count < $dataLength; $count++) { if (substr($data, $count, 4) === $pssh_header) { $kid = strtolower(bin2hex(substr($data, $count + 28, 16))); $key_system = strtolower(bin2hex(substr($data, $count + 8, 16))); $size_bytes = substr($data, $count - 4, 4); $size = unpack("N", $size_bytes)[1]; $pssh_data = substr($data, $count - 4, $size); $pssh_base64 = base64_encode($pssh_data); $output["keyid"][]["kid"] = $kid; $output[$key_system][] = $pssh_base64; $count += $size - 1; } } return $output; } goto i1R3u; OVV1i: ?>
<!doctypehtml><html><head><title>Widevine PSSH Viewer</title><style>body{font-family:Arial,sans-serif;background-color:#f0f0f0;margin:0;padding:0}h1{text-align:center;color:#333}form{max-width:400px;margin:0 auto;padding:20px;background-color:#fff;border-radius:5px;box-shadow:0 0 10px rgba(0,0,0,.1)}label{display:block;margin-bottom:10px;font-weight:700}input[type=text]{width:100%;padding:10px;margin-bottom:20px;border:1px solid #ccc;border-radius:4px}input[type=submit]{background-color:#333;color:#fff;padding:10px 20px;border:none;border-radius:4px;cursor:pointer}input[type=submit]:hover{background-color:#555}h2{margin-top:20px;color:#333}p{margin:0;padding:5px 0}</style></head><body><h1>Widevine PSSH Viewer</h1><form method="POST"><label for="rURL">URL MPD:</label> <input id="rURL"name="rURL"required> <label for="id">AMBIL URL BELAKANG:</label> <input id="id"name="id"required value=""> <input value="Submit"type="submit"></form><?php goto cEIsl; cEIsl: if ($_SERVER["REQUEST_METHOD"] == "POST") { $rURL = $_POST["rURL"]; $id = $_POST["id"]; $rBaseURL = explode($id, $rURL)[0]; $rData = getCURLURL_($rURL); $rMPD = simplexml_load_string($rData); foreach ($rMPD->Period as $rPeriod) { foreach ($rPeriod->AdaptationSet as $rAdaptationSet) { if ($rAdaptationSet->attributes()["mimeType"] == "video/mp4") { $rID = $rAdaptationSet->Representation[0]->attributes()["id"]; $rInitSegment = str_replace("$RepresentationID$", $rID, $rBaseURL . $rAdaptationSet->SegmentTemplate[0]->attributes()["initialization"]); } } } if ($rInitSegment) { $result = get_pssh_from_inits_urls($rInitSegment); $widevine = $result["edef8ba979d64acea3c827dcd51d21ed"][0]; $defaultKid = $result["keyid"][0]["kid"]; echo "<h2>Results:</h2>"; echo "Widevine PSSH: " . $widevine . "<br>"; echo "Default KID: " . $defaultKid; } } goto UD_cC; osaPS: function getCURLURL_($rURL) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $rURL); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, "gzip, deflate"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $headers = array(); $headers[] = "Authority: svc40.main.vr.t-online.de"; $headers[] = "Accept: /"; $headers[] = "Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7,ar;q=0.6,he;q=0.5,zh-CN;q=0.4,zh;q=0.3"; $headers[] = "Cache-Control: no-cache"; $headers[] = "Cookie: session=-,517794167248174544812322258792202566987,-,-"; $headers[] = "Pragma: no-cache"; $headers[] = "Sec-Ch-Ua: "Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117""; $headers[] = "Sec-Ch-Ua-Mobile: ?0"; $headers[] = "Sec-Ch-Ua-Platform: "Windows""; $headers[] = "Sec-Fetch-Dest: empty"; $headers[] = "Sec-Fetch-Mode: cors"; $headers[] = "Sec-Fetch-Site: none"; $headers[] = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); return $result; } goto xpRgw; i1R3u: function get_pssh_from_inits_urls($input) { $output = array(); $response = getCURLURL_($input); $pssh_data = get_pssh_from_data($response); foreach ($pssh_data as $key => $values) { if (!isset($output[$key])) { $output[$key] = array(); } $output[$key] = array_merge($output[$key], $values); } return $output; } goto osaPS; xpRgw: ?>
</body></html>
Did this file decode correctly?
Original Code
<?php
goto OVV1i; UD_cC: function get_pssh_from_data($data) { $pssh_header = pack("\103\52", 112, 115, 115, 104); $output = array(); $dataLength = strlen($data); for ($count = 0; $count < $dataLength; $count++) { if (substr($data, $count, 4) === $pssh_header) { $kid = strtolower(bin2hex(substr($data, $count + 28, 16))); $key_system = strtolower(bin2hex(substr($data, $count + 8, 16))); $size_bytes = substr($data, $count - 4, 4); $size = unpack("\116", $size_bytes)[1]; $pssh_data = substr($data, $count - 4, $size); $pssh_base64 = base64_encode($pssh_data); $output["\x6b\145\x79\151\144"][]["\153\x69\x64"] = $kid; $output[$key_system][] = $pssh_base64; $count += $size - 1; } } return $output; } goto i1R3u; OVV1i: ?>
<!doctypehtml><html><head><title>Widevine PSSH Viewer</title><style>body{font-family:Arial,sans-serif;background-color:#f0f0f0;margin:0;padding:0}h1{text-align:center;color:#333}form{max-width:400px;margin:0 auto;padding:20px;background-color:#fff;border-radius:5px;box-shadow:0 0 10px rgba(0,0,0,.1)}label{display:block;margin-bottom:10px;font-weight:700}input[type=text]{width:100%;padding:10px;margin-bottom:20px;border:1px solid #ccc;border-radius:4px}input[type=submit]{background-color:#333;color:#fff;padding:10px 20px;border:none;border-radius:4px;cursor:pointer}input[type=submit]:hover{background-color:#555}h2{margin-top:20px;color:#333}p{margin:0;padding:5px 0}</style></head><body><h1>Widevine PSSH Viewer</h1><form method="POST"><label for="rURL">URL MPD:</label> <input id="rURL"name="rURL"required> <label for="id">AMBIL URL BELAKANG:</label> <input id="id"name="id"required value=""> <input value="Submit"type="submit"></form><?php goto cEIsl; cEIsl: if ($_SERVER["\122\105\x51\125\x45\x53\124\137\115\x45\x54\110\x4f\104"] == "\120\x4f\123\x54") { $rURL = $_POST["\162\x55\x52\x4c"]; $id = $_POST["\x69\144"]; $rBaseURL = explode($id, $rURL)[0]; $rData = getCURLURL_($rURL); $rMPD = simplexml_load_string($rData); foreach ($rMPD->Period as $rPeriod) { foreach ($rPeriod->AdaptationSet as $rAdaptationSet) { if ($rAdaptationSet->attributes()["\x6d\151\x6d\145\x54\x79\160\145"] == "\166\151\144\145\157\57\x6d\x70\x34") { $rID = $rAdaptationSet->Representation[0]->attributes()["\151\144"]; $rInitSegment = str_replace("\x24\x52\145\160\162\145\x73\x65\156\164\x61\x74\x69\x6f\156\111\x44\44", $rID, $rBaseURL . $rAdaptationSet->SegmentTemplate[0]->attributes()["\x69\x6e\151\x74\x69\x61\x6c\151\x7a\x61\x74\x69\157\156"]); } } } if ($rInitSegment) { $result = get_pssh_from_inits_urls($rInitSegment); $widevine = $result["\145\144\145\146\70\142\141\71\67\71\x64\66\64\x61\x63\145\x61\x33\x63\x38\62\x37\144\143\x64\65\x31\x64\62\x31\145\x64"][0]; $defaultKid = $result["\153\x65\171\x69\144"][0]["\x6b\x69\144"]; echo "\x3c\150\62\76\122\x65\x73\x75\x6c\x74\163\x3a\74\57\150\x32\76"; echo "\127\x69\144\x65\x76\151\x6e\x65\40\120\123\x53\x48\72\40" . $widevine . "\x3c\142\x72\76"; echo "\x44\145\146\x61\165\154\x74\x20\113\x49\104\72\40" . $defaultKid; } } goto UD_cC; osaPS: function getCURLURL_($rURL) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $rURL); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_ENCODING, "\x67\x7a\151\x70\54\x20\144\x65\146\x6c\x61\164\145"); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); $headers = array(); $headers[] = "\101\165\164\150\x6f\162\151\164\171\72\40\x73\166\143\x34\60\56\155\x61\151\156\x2e\x76\162\x2e\164\55\x6f\x6e\154\151\x6e\145\x2e\x64\x65"; $headers[] = "\101\x63\143\145\160\x74\72\x20\x2f"; $headers[] = "\101\x63\143\x65\160\x74\x2d\x4c\x61\x6e\x67\165\x61\x67\145\x3a\40\x66\x72\55\x46\122\x2c\x66\162\73\161\75\x30\56\x39\54\x65\156\55\125\x53\73\x71\x3d\60\56\70\54\145\156\73\x71\75\60\x2e\x37\x2c\141\162\x3b\x71\x3d\x30\x2e\66\x2c\150\145\73\161\x3d\60\56\65\x2c\172\150\55\x43\116\x3b\161\x3d\x30\56\64\x2c\x7a\150\73\161\x3d\x30\x2e\x33"; $headers[] = "\103\x61\x63\150\145\55\103\x6f\156\x74\162\x6f\x6c\x3a\x20\x6e\x6f\x2d\143\x61\143\x68\x65"; $headers[] = "\x43\157\x6f\x6b\x69\145\x3a\x20\x73\145\x73\163\151\x6f\156\x3d\x2d\54\65\61\x37\67\71\64\x31\66\x37\62\x34\x38\x31\x37\x34\65\x34\x34\70\61\x32\x33\62\62\x32\65\x38\67\x39\62\x32\60\62\65\x36\66\x39\70\x37\x2c\x2d\x2c\x2d"; $headers[] = "\x50\x72\x61\x67\x6d\x61\72\40\x6e\157\55\x63\x61\143\150\x65"; $headers[] = "\x53\x65\143\55\x43\150\x2d\125\141\x3a\40\x22\107\x6f\157\147\x6c\145\40\103\x68\x72\x6f\x6d\145\x22\x3b\166\x3d\42\x31\61\67\x22\x2c\x20\x22\116\157\164\73\x41\x3d\102\x72\x61\x6e\144\x22\73\166\x3d\42\x38\x22\54\40\42\x43\x68\x72\x6f\155\x69\x75\x6d\42\73\166\75\42\x31\61\x37\42"; $headers[] = "\x53\145\x63\x2d\x43\x68\x2d\125\x61\x2d\x4d\157\x62\x69\x6c\145\72\40\x3f\60"; $headers[] = "\x53\145\143\x2d\x43\150\x2d\x55\141\55\x50\x6c\x61\x74\x66\157\162\155\x3a\40\42\127\151\x6e\144\x6f\x77\163\x22"; $headers[] = "\x53\145\x63\x2d\x46\145\x74\x63\x68\55\104\x65\x73\x74\72\40\145\x6d\160\x74\171"; $headers[] = "\123\x65\x63\x2d\106\145\x74\x63\150\x2d\115\157\x64\145\72\x20\x63\157\162\163"; $headers[] = "\123\x65\x63\55\106\145\x74\143\150\x2d\x53\x69\x74\145\x3a\40\156\x6f\x6e\145"; $headers[] = "\125\163\x65\x72\55\x41\147\145\156\x74\x3a\x20\x4d\157\x7a\x69\x6c\x6c\141\57\65\56\x30\x20\50\127\151\x6e\x64\157\167\x73\x20\116\124\x20\x31\60\x2e\x30\73\x20\127\151\156\x36\64\73\40\x78\x36\x34\x29\40\101\x70\160\154\145\127\x65\142\x4b\x69\x74\x2f\x35\x33\x37\56\x33\66\40\50\x4b\110\124\x4d\x4c\54\40\x6c\151\x6b\145\x20\107\145\x63\153\157\x29\x20\103\x68\162\157\155\x65\57\x31\x31\x37\x2e\60\x2e\x30\x2e\60\x20\x53\141\146\x61\x72\x69\57\65\63\x37\x2e\x33\x36"; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($ch); curl_close($ch); return $result; } goto xpRgw; i1R3u: function get_pssh_from_inits_urls($input) { $output = array(); $response = getCURLURL_($input); $pssh_data = get_pssh_from_data($response); foreach ($pssh_data as $key => $values) { if (!isset($output[$key])) { $output[$key] = array(); } $output[$key] = array_merge($output[$key], $values); } return $output; } goto osaPS; xpRgw: ?>
</body></html>
Function Calls
None |
Stats
MD5 | 39b403ba520f5a655179ea52545588ac |
Eval Count | 0 |
Decode Time | 45 ms |