
<?php
header("Content-type:text/html;charset=utf-8");
include'cookie.php';


$ip=get_real_ip();
$split = explode(".", $ip);
$ip = $split[3];
$count=count($cookie);
$userid=$_GET['user'];
$shouye=$_GET['shouye'];
if ($userid != ""){
$user=$userid;
}

if ($user == ""){
$rand=$ip%$count;
}
else{
$rand=$user;
}


$cookie=$cookie[$rand];



$time=time();
$fileId="-11";
$fileId2="-11".$rand;
$fileidtime=$fileId2."time".$rand;
$file_exists=file_exists("./cathe/$fileidtime.txt");
if($file_exists=="1"){
$edtime=file_get_contents("./cathe/$fileidtime.txt");
}
else{
$edtime=0;	
}

if ($edtime+36000>$time){
$php = file_get_contents("./cathe/$fileId2.txt");
}
else {
$shell = "echo $(curl 'https://cloud.189.cn/v2/listFiles.action?fileId=$fileId&mediaType=&keyword=&inGroupSpace=false&orderBy=$sort&order=DESC&pageNum=1&pageSize=300&noCache=0.23420654076326164' -H 'Cookie: $cookie' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: zh-CN,zh;q=0.9' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36' -H 'Accept: */*' -H 'Referer: https://cloud.189.cn/main.action' --compressed)>./cathe/$fileId2.txt;echo '$time'>./cathe/$fileidtime.txt;echo $(curl 'https://cloud.189.cn/v2/listFiles.action?fileId=-11&mediaType=&keyword=&inGroupSpace=false&orderBy=$sort&order=DESC&pageNum=1&pageSize=300&noCache=0.23420654076326164' -H 'Cookie: $cookie' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: zh-CN,zh;q=0.9' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36' -H 'Accept: */*' -H 'Referer: https://cloud.189.cn/main.action' --compressed)";
$php= exec($shell, $result, $status);
}



$video="video.php";
$music="music.php";
$img="img.php";
$txt="sh.php";
$wps="wps.php";
$file="file.php";
$down="down.php";
$a=(json_decode($php, true));
$type=$a[data][0][fileName];
if ($type == ""){
echo "请检查cookie是否正确配置";	
}
$chu=1048576;
?>
