'; ?>
Auto Upload '.$server.'
- Code by RoSino18k
'; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $ua); if (!file_exists($cookie) || (filemtime($cookie) < time() - 3600)) { curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie); curl_exec($ch); } curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie); curl_setopt($ch, CURLOPT_URL, 'http://'.$server.'.com/filebrowser?a=&f=&file=/'); $html = curl_exec($ch); preg_match('#token=(.*?)&#is', $html, $matches); $token = @$matches[1]; if(!isset($token)) { @unlink($cookie); die('Đăng nhập không thành công'); } else { echo 'Đăng nhập thành công!
'; sleep(1); $d[] = ''; if(!isset($_SESSION['dir'])) $_SESSION['dir'] = Array(); $all = 0; do{ $Arr = array_shift($d); $h = @opendir('Upload/'.$Arr); while($dir = @readdir($h)){ if($dir[0]!='.' && is_readable('Upload/'.$Arr)) { if(is_dir('Upload/'.$Arr.'/'.$dir)) { $d[] = $Arr.'/'.$dir; if(!in_array($Arr.'/'.$dir, $_SESSION['dir'])) { echo $Arr.'/'.$dir.'
'; $_SESSION['dir'][] = $Arr.'/'.$dir; curl_setopt($ch, CURLOPT_URL, 'http://'.$server.'.com/filebrowser/file_save?__token='.$token.'&act=new_dir&dir='.$Arr); curl_setopt($ch, CURLOPT_POSTFIELDS, array('value' => $dir, 'submit' => 'OK')); curl_exec($ch); }} else{ echo $Arr.'/'.$dir.'
'; $file = dirname(__FILE__).'/Upload/'.$Arr.'/'.$dir; curl_setopt($ch, CURLOPT_URL, 'http://'.$server.'.com/filebrowser/file_upload?file=/'.$Arr); $html = curl_exec($ch); preg_match('##', $html, $m); $filename = 'filext'.$m[1]; if(!isset($filename)) continue; curl_setopt($ch, CURLOPT_URL, 'http://'.$server.'.com/filebrowser/file_upload_save?__token='.$token.'&file=/'.$Arr); curl_setopt($ch, CURLOPT_POSTFIELDS, array('MAX_FILE_SIZE' => '2097152', $filename => '@'.$file, 'upload_more' => 'y', 'submit' => 'OK')); curl_exec($ch); unlink('Upload/'.$Arr.'/'.$dir); die(''); } } } @closedir($h); if($Arr) @rmdir('Upload/'.$Arr); } while (sizeof($Arr) > 0); if(!$all) { echo 'Đã Up Xong File. Hãy Up File Vào Thư Mục Upload Để Tiếp Tục!
'; unset($_SESSION['dir']); } echo '-----------------
ĐÃ UP XONG!'; curl_close($ch); echo '

Duck hunt
'; } ?>