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-01-07 09:41:40              | 
    |    GitHub: https://github.com/pk-fr/yakpro-po    | 
    |__________________________________________________| 
*/ 
 namespace GDPlayer; use GDPlayer\Helper; class SubtitleConverter { private $helper; private $content = ''; private $sourceTypes = ["youtube"]; public function __construct() { session_write_close(); $this->helper = new Helper(); } public function loadFromFile(string $file = '') { goto TCcfI0rCa0Hc721; N39hObYTRFba8Ua: if (!$fp) { goto vALCsN4IQZh6GyC; } goto JnQdYlPvZqKUbtB; TCcfI0rCa0Hc721: session_write_close(); goto DFbCw9H4C0rsYGw; GIYPBQgY00pzD9c: session_write_close(); goto eFLzwyHklHfmd5M; JnQdYlPvZqKUbtB: session_write_close(); goto JerTnsIvhgpPw67; JerTnsIvhgpPw67: $content = stream_get_contents($fp); goto sNpcujg1R8OQe7A; d2gQS3n3wQoUgXb: $this->content = $content; goto ppUqd669jCdVqBd; eFLzwyHklHfmd5M: open_resources_handler(); goto hRJvZb15nYdvJAJ; E_KhP20aiuah8DL: vSUyvjKplpuhMuw: goto EmfWsJRxPP3s0mu; p_xvhlNz8dyqodI: if (!$content) { goto VkZfrvpjZ_Npxz7; } goto CXSG6uTLX52S8zU; ppUqd669jCdVqBd: VkZfrvpjZ_Npxz7: goto EljbEDos7v43xiT; sNpcujg1R8OQe7A: fclose($fp); goto p_xvhlNz8dyqodI; CXSG6uTLX52S8zU: session_write_close(); goto d2gQS3n3wQoUgXb; DFbCw9H4C0rsYGw: if (!(is_file($file) && is_readable($file))) { goto vSUyvjKplpuhMuw; } goto GIYPBQgY00pzD9c; EljbEDos7v43xiT: vALCsN4IQZh6GyC: goto E_KhP20aiuah8DL; hRJvZb15nYdvJAJ: $fp = @fopen($file, "r"); goto N39hObYTRFba8Ua; EmfWsJRxPP3s0mu: } public function loadFromURL(string $url = '') { goto NOS1q4YCXDdL0YR; lTRbFz01xylQ2rA: $ch = $this->helper->getCurlDefaultConfig(curl_init()); goto MP3pT9S0mKpTnWC; uISBntX4oC5PQIg: curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); goto o3qvlfBUe815PL1; LobEwYBp1L0YB96: $this->content = $response; goto eqBXCXHdyc1kaih; qhDBrYTrwXsBWcU: session_write_close(); goto oeTQAZ0POcASV3N; wWe1s__eW0m9kt1: session_write_close(); goto lTRbFz01xylQ2rA; yPggRHu5TJ86P8P: session_write_close(); goto LobEwYBp1L0YB96; KP8Yox4WeB0nvzW: curl_close($ch); goto lMmFUAFIiv8aPi6; jmnLG7PWklvG8Gd: goto Qu2MxlT6Wooo85F; goto nO5kcSroAWibDXD; lMmFUAFIiv8aPi6: if (!$err) { goto RMNs0MGsVauBd5q; } goto qhDBrYTrwXsBWcU; eqBXCXHdyc1kaih: Qu2MxlT6Wooo85F: goto lFl0YQT5W1YqRjZ; MP3pT9S0mKpTnWC: curl_setopt($ch, CURLOPT_URL, $url); goto uISBntX4oC5PQIg; o3qvlfBUe815PL1: $response = curl_exec($ch); goto NUbnBzqleRkUBwu; nO5kcSroAWibDXD: RMNs0MGsVauBd5q: goto yPggRHu5TJ86P8P; NUbnBzqleRkUBwu: $err = curl_error($ch); goto KP8Yox4WeB0nvzW; lFl0YQT5W1YqRjZ: HuhNvJ6ngvxYQav: goto H6GSUugyiGV23Ah; NOS1q4YCXDdL0YR: session_write_close(); goto f8HMI6RvcPZthqk; f8HMI6RvcPZthqk: if (!validate_url($url)) { goto HuhNvJ6ngvxYQav; } goto wWe1s__eW0m9kt1; oeTQAZ0POcASV3N: createErrorLog([__FILE__, __FUNCTION__, $url, $err]); goto jmnLG7PWklvG8Gd; H6GSUugyiGV23Ah: } public function loadContent(string $content = '') { session_write_close(); $this->content = $content; } protected function internalTimeToVtt(string $internal_time = '') { goto ajs8lIyuPBm2IT4; NKAsX51jix9WAPd: $whole = $parts[0]; goto IomiQORrQ3JGXtL; GnPut9qpbUGvwjO: $parts = explode(".", $internal_time); goto NKAsX51jix9WAPd; IomiQORrQ3JGXtL: $decimal = isset($parts[1]) ? substr($parts[1], 0, 3) : 0; goto Eno16X8YVBKJYQs; Eno16X8YVBKJYQs: return gmdate("H:i:s", floor($whole)) . "." . str_pad($decimal, 3, "0", STR_PAD_RIGHT); goto dD560v1p1YR9hXB; ajs8lIyuPBm2IT4: session_write_close(); goto GnPut9qpbUGvwjO; dD560v1p1YR9hXB: } protected function youtubeToVTT() { goto cK1XDCIPK3kT1Lz; Vx8j0YJbQAxtVd1: $xml = @simplexml_load_string($this->content); goto dkNXTQYAv1J93E_; dkNXTQYAv1J93E_: if ($xml) { goto PLRhcpmkginZcDx; } goto IrWuUZbnPqDXE0Z; IrWuUZbnPqDXE0Z: session_write_close(); goto oJjCu2BWWpWdQUR; oJjCu2BWWpWdQUR: return $result; goto oAoZGBWye_OMWfB; d7UElaIPr6k05YN: $list = $xml->text; goto l4NBAdS0Hf9iw37; l4NBAdS0Hf9iw37: foreach ($list as $text) { goto OjQ6GFscp9_wXJ5; OjQ6GFscp9_wXJ5: session_write_close(); goto L7KAz2BjYogSx2e; CxzROwj4rmna5u1: $result .= $text . "
\xa"; goto UjT3VF4vYfwzJiM; CNTQAe0dhyGaQp6: $result .= $this->internalTimeToVtt($text->attributes()->start) . " --> {$end}
"; goto CxzROwj4rmna5u1; L7KAz2BjYogSx2e: $end = $this->internalTimeToVtt(floatval($text->attributes()->start) + floatval($text->attributes()->dur)); goto CNTQAe0dhyGaQp6; UjT3VF4vYfwzJiM: xgUKndwpPw5TzE7: goto il1nWki0obKpSDl; il1nWki0obKpSDl: } goto mNcG4zyc9bqYLC9; WxMRfYugCepN_An: return $result; goto jjaa2IOkBWmQwOz; cK1XDCIPK3kT1Lz: session_write_close(); goto OnNAA1lSEKo1273; OnNAA1lSEKo1273: $result = ''; goto Vx8j0YJbQAxtVd1; mNcG4zyc9bqYLC9: EneIYX1VtYxwN4S: goto WxMRfYugCepN_An; oAoZGBWye_OMWfB: PLRhcpmkginZcDx: goto d7UElaIPr6k05YN; jjaa2IOkBWmQwOz: } public function convertToVTT(string $sourceType = '') { goto IwqH9BU88eddlT2; Ll0V8yv1NwM9pjB: V6Z6bz8XMofr1Rh: goto Bi0NapCdTARmima; bT2OSJmqFjAnTGr: session_write_close(); goto t9f_mhPIlpZUDkP; PMUC0PHm_NjHIlK: session_write_close(); goto OMB4qVeBQaAMHvu; hueVNaP0zvgKaxi: if (!(empty($this->content) || empty($sourceType) || !in_array($sourceType, $this->sourceTypes))) { goto V6Z6bz8XMofr1Rh; } goto PMUC0PHm_NjHIlK; IfkDuUbOfuUjrX8: return $result; goto gJdBRQL2IEWD0DC; t9f_mhPIlpZUDkP: $result .= $this->youtubeToVTT(); goto WCmJdmaELxd3Rk7; QgJy0T2V3a3RLQc: $result = "WEBVTT\xa\xa"; goto hueVNaP0zvgKaxi; OMB4qVeBQaAMHvu: return $result; goto Ll0V8yv1NwM9pjB; Bi0NapCdTARmima: if (!($sourceType === "youtube")) { goto QJ6R0L2BC9icStg; } goto bT2OSJmqFjAnTGr; IwqH9BU88eddlT2: session_write_close(); goto QgJy0T2V3a3RLQc; WCmJdmaELxd3Rk7: QJ6R0L2BC9icStg: goto IfkDuUbOfuUjrX8; gJdBRQL2IEWD0DC: } } 
 ?>

Did this file decode correctly?

Original Code

<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  |
    |              on 2023-01-07 09:41:40              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
 namespace GDPlayer; use GDPlayer\Helper; class SubtitleConverter { private $helper; private $content = ''; private $sourceTypes = ["\x79\x6f\x75\164\165\x62\x65"]; public function __construct() { session_write_close(); $this->helper = new Helper(); } public function loadFromFile(string $file = '') { goto TCcfI0rCa0Hc721; N39hObYTRFba8Ua: if (!$fp) { goto vALCsN4IQZh6GyC; } goto JnQdYlPvZqKUbtB; TCcfI0rCa0Hc721: session_write_close(); goto DFbCw9H4C0rsYGw; GIYPBQgY00pzD9c: session_write_close(); goto eFLzwyHklHfmd5M; JnQdYlPvZqKUbtB: session_write_close(); goto JerTnsIvhgpPw67; JerTnsIvhgpPw67: $content = stream_get_contents($fp); goto sNpcujg1R8OQe7A; d2gQS3n3wQoUgXb: $this->content = $content; goto ppUqd669jCdVqBd; eFLzwyHklHfmd5M: open_resources_handler(); goto hRJvZb15nYdvJAJ; E_KhP20aiuah8DL: vSUyvjKplpuhMuw: goto EmfWsJRxPP3s0mu; p_xvhlNz8dyqodI: if (!$content) { goto VkZfrvpjZ_Npxz7; } goto CXSG6uTLX52S8zU; ppUqd669jCdVqBd: VkZfrvpjZ_Npxz7: goto EljbEDos7v43xiT; sNpcujg1R8OQe7A: fclose($fp); goto p_xvhlNz8dyqodI; CXSG6uTLX52S8zU: session_write_close(); goto d2gQS3n3wQoUgXb; DFbCw9H4C0rsYGw: if (!(is_file($file) && is_readable($file))) { goto vSUyvjKplpuhMuw; } goto GIYPBQgY00pzD9c; EljbEDos7v43xiT: vALCsN4IQZh6GyC: goto E_KhP20aiuah8DL; hRJvZb15nYdvJAJ: $fp = @fopen($file, "\162"); goto N39hObYTRFba8Ua; EmfWsJRxPP3s0mu: } public function loadFromURL(string $url = '') { goto NOS1q4YCXDdL0YR; lTRbFz01xylQ2rA: $ch = $this->helper->getCurlDefaultConfig(curl_init()); goto MP3pT9S0mKpTnWC; uISBntX4oC5PQIg: curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "\x47\x45\124"); goto o3qvlfBUe815PL1; LobEwYBp1L0YB96: $this->content = $response; goto eqBXCXHdyc1kaih; qhDBrYTrwXsBWcU: session_write_close(); goto oeTQAZ0POcASV3N; wWe1s__eW0m9kt1: session_write_close(); goto lTRbFz01xylQ2rA; yPggRHu5TJ86P8P: session_write_close(); goto LobEwYBp1L0YB96; KP8Yox4WeB0nvzW: curl_close($ch); goto lMmFUAFIiv8aPi6; jmnLG7PWklvG8Gd: goto Qu2MxlT6Wooo85F; goto nO5kcSroAWibDXD; lMmFUAFIiv8aPi6: if (!$err) { goto RMNs0MGsVauBd5q; } goto qhDBrYTrwXsBWcU; eqBXCXHdyc1kaih: Qu2MxlT6Wooo85F: goto lFl0YQT5W1YqRjZ; MP3pT9S0mKpTnWC: curl_setopt($ch, CURLOPT_URL, $url); goto uISBntX4oC5PQIg; o3qvlfBUe815PL1: $response = curl_exec($ch); goto NUbnBzqleRkUBwu; nO5kcSroAWibDXD: RMNs0MGsVauBd5q: goto yPggRHu5TJ86P8P; NUbnBzqleRkUBwu: $err = curl_error($ch); goto KP8Yox4WeB0nvzW; lFl0YQT5W1YqRjZ: HuhNvJ6ngvxYQav: goto H6GSUugyiGV23Ah; NOS1q4YCXDdL0YR: session_write_close(); goto f8HMI6RvcPZthqk; f8HMI6RvcPZthqk: if (!validate_url($url)) { goto HuhNvJ6ngvxYQav; } goto wWe1s__eW0m9kt1; oeTQAZ0POcASV3N: createErrorLog([__FILE__, __FUNCTION__, $url, $err]); goto jmnLG7PWklvG8Gd; H6GSUugyiGV23Ah: } public function loadContent(string $content = '') { session_write_close(); $this->content = $content; } protected function internalTimeToVtt(string $internal_time = '') { goto ajs8lIyuPBm2IT4; NKAsX51jix9WAPd: $whole = $parts[0]; goto IomiQORrQ3JGXtL; GnPut9qpbUGvwjO: $parts = explode("\56", $internal_time); goto NKAsX51jix9WAPd; IomiQORrQ3JGXtL: $decimal = isset($parts[1]) ? substr($parts[1], 0, 3) : 0; goto Eno16X8YVBKJYQs; Eno16X8YVBKJYQs: return gmdate("\110\x3a\x69\72\x73", floor($whole)) . "\56" . str_pad($decimal, 3, "\60", STR_PAD_RIGHT); goto dD560v1p1YR9hXB; ajs8lIyuPBm2IT4: session_write_close(); goto GnPut9qpbUGvwjO; dD560v1p1YR9hXB: } protected function youtubeToVTT() { goto cK1XDCIPK3kT1Lz; Vx8j0YJbQAxtVd1: $xml = @simplexml_load_string($this->content); goto dkNXTQYAv1J93E_; dkNXTQYAv1J93E_: if ($xml) { goto PLRhcpmkginZcDx; } goto IrWuUZbnPqDXE0Z; IrWuUZbnPqDXE0Z: session_write_close(); goto oJjCu2BWWpWdQUR; oJjCu2BWWpWdQUR: return $result; goto oAoZGBWye_OMWfB; d7UElaIPr6k05YN: $list = $xml->text; goto l4NBAdS0Hf9iw37; l4NBAdS0Hf9iw37: foreach ($list as $text) { goto OjQ6GFscp9_wXJ5; OjQ6GFscp9_wXJ5: session_write_close(); goto L7KAz2BjYogSx2e; CxzROwj4rmna5u1: $result .= $text . "\12\xa"; goto UjT3VF4vYfwzJiM; CNTQAe0dhyGaQp6: $result .= $this->internalTimeToVtt($text->attributes()->start) . "\x20\55\55\76\x20{$end}\12"; goto CxzROwj4rmna5u1; L7KAz2BjYogSx2e: $end = $this->internalTimeToVtt(floatval($text->attributes()->start) + floatval($text->attributes()->dur)); goto CNTQAe0dhyGaQp6; UjT3VF4vYfwzJiM: xgUKndwpPw5TzE7: goto il1nWki0obKpSDl; il1nWki0obKpSDl: } goto mNcG4zyc9bqYLC9; WxMRfYugCepN_An: return $result; goto jjaa2IOkBWmQwOz; cK1XDCIPK3kT1Lz: session_write_close(); goto OnNAA1lSEKo1273; OnNAA1lSEKo1273: $result = ''; goto Vx8j0YJbQAxtVd1; mNcG4zyc9bqYLC9: EneIYX1VtYxwN4S: goto WxMRfYugCepN_An; oAoZGBWye_OMWfB: PLRhcpmkginZcDx: goto d7UElaIPr6k05YN; jjaa2IOkBWmQwOz: } public function convertToVTT(string $sourceType = '') { goto IwqH9BU88eddlT2; Ll0V8yv1NwM9pjB: V6Z6bz8XMofr1Rh: goto Bi0NapCdTARmima; bT2OSJmqFjAnTGr: session_write_close(); goto t9f_mhPIlpZUDkP; PMUC0PHm_NjHIlK: session_write_close(); goto OMB4qVeBQaAMHvu; hueVNaP0zvgKaxi: if (!(empty($this->content) || empty($sourceType) || !in_array($sourceType, $this->sourceTypes))) { goto V6Z6bz8XMofr1Rh; } goto PMUC0PHm_NjHIlK; IfkDuUbOfuUjrX8: return $result; goto gJdBRQL2IEWD0DC; t9f_mhPIlpZUDkP: $result .= $this->youtubeToVTT(); goto WCmJdmaELxd3Rk7; QgJy0T2V3a3RLQc: $result = "\x57\x45\102\x56\124\x54\xa\xa"; goto hueVNaP0zvgKaxi; OMB4qVeBQaAMHvu: return $result; goto Ll0V8yv1NwM9pjB; Bi0NapCdTARmima: if (!($sourceType === "\171\x6f\x75\164\x75\142\145")) { goto QJ6R0L2BC9icStg; } goto bT2OSJmqFjAnTGr; IwqH9BU88eddlT2: session_write_close(); goto QgJy0T2V3a3RLQc; WCmJdmaELxd3Rk7: QJ6R0L2BC9icStg: goto IfkDuUbOfuUjrX8; gJdBRQL2IEWD0DC: } }

Function Calls

None

Variables

None

Stats

MD5 4570d4a1c80511619ca1f425dfeb1331
Eval Count 0
Decode Time 57 ms