ÿØÿà JFIF ÿÛ „ ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/st2/ |
<?php include 'const.php'; include "lib/simple_html_dom.php"; function str_encode($data,$pwd) { $x = 0; $a = 0; $j = 0; $Zcrypt = ''; $pwd_length = strlen($pwd); for ($i = 0; $i < 255; $i++) { $key[$i] = ord(substr($pwd, ($i % $pwd_length)+1, 1)); $counter[$i] = $i; } for ($i = 0; $i < 255; $i++) { $x = ($x + $counter[$i] + $key[$i]) % 256; $temp_swap = $counter[$i]; $counter[$i] = $counter[$x]; $counter[$x] = $temp_swap; } for ($i = 0; $i < strlen($data); $i++) { $a = ($a + 1) % 256; $j = ($j + $counter[$a]) % 256; $temp = $counter[$a]; $counter[$a] = $counter[$j]; $counter[$j] = $temp; $k = $counter[(($counter[$a] + $counter[$j]) % 256)]; $Zcipher = ord(substr($data, $i, 1)) ^ $k; $Zcrypt .= chr($Zcipher); } return $Zcrypt; } function getlink($id) { $link = "https://drive.google.com/uc?export=download&id=$id"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $link); curl_setopt($ch, CURLOPT_HEADER, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . "/google.mp3"); curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . "/google.mp3"); $page = curl_exec($ch); $chuyen = locheader($page); if ($chuyen != ""){ } else { $html = str_get_html($page); $link = urldecode(trim($html->find('a[id=uc-download-link]',0)->href)); $tmp = explode("confirm=",$link); $tmp2 = explode("&",$tmp[1]); $confirm = $tmp2[0]; $linkdowngoc = "https://drive.google.com/uc?export=download&id=$id&confirm=$confirm"; curl_setopt ($ch, CURLOPT_URL, $linkdowngoc); curl_setopt($ch, CURLOPT_HEADER, TRUE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . "/google.mp3"); curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . "/google.mp3"); // Getting binary data $page = curl_exec($ch); $chuyen = locheader($page); } curl_close($ch); return $chuyen; } function locheader($page) { $temp = explode("\r\n", $page); foreach ($temp as $item) { $temp2 = explode(": ", $item); $infoheader[$temp2[0]] = $temp2[1]; } $location = $infoheader['Location']; return $location; } $id_encode = $_GET['link']; $id = str_encode(hex2bin($id_encode),$INFO['passdrive']); $linkdown = trim(getlink($id)); $arr_check = get_headers($linkdown,true); $arr['link'] = $linkdown ; $arr['type'] = $arr_check['Content-Type']; if($arr['link']!='' and $arr['type']=='video/mp4') { $arr_file = $arr; } if($arr_file['link']!='' and $arr_file['type']=='video/mp4') { ini_set('max_execution_time', 0); $useragent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36"; $v = $arr_file['link']; $v = str_replace('?e=download','',$v); $length = filesize($v); $file = fopen ($v, "r"); if (!$file) { echo "<p>Unable to open remote file.\n"; exit(); } ob_end_flush(); $chunksize = 1*(1024*1024); header('HTTP/1.0 200 OK'); header("Content-Type: video/mp4"); header('Accept-Ranges: bytes'); header("Content-Disposition: inline;"); header("Content-Range: bytes"); header("Content-Transfer-Encoding: binary"); header('Connection: close'); if(!empty($length) and $length>0) { header('Content-Length: ' . $length); } while (!feof ($file)) { $buffer = fread($file, $chunksize); echo $buffer; flush(); } fclose($file); exit(); }else{ echo "<p>Unable to open remote file.\n"; exit(); } //echo json_encode($arr_file); ?>