Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('TW_PATH', str_replace('leech','', dirname(__FILE__)));
- define('URL_POST', 'http://up/zink.php');//link đến file zink
- define('AUTOLOGIN', 'http://xtgem.com/autologin/79d6666090fb74130f8d58938038ed76/dGFpdm5uLndhcC5zaA==');
- session_start();
- set_time_limit(0);
- $tit = 'Tool leech hayday';
- $key = 'Tool leech hayday';
- $des = 'tool leech hayday';
- include 'head.php';
- $cat = explode(',',file_get_contents(TW_PATH .'/luu.zink'));
- $option = '';
- foreach($cat as $k =>$c){
- $option .= '<option value="'.$k.'">'.$c.'</option>';
- }
- echo '<div class="list1">';
- if(!isset($_SESSION['auto']) && !isset($_SESSION['dir'])){
- echo '<font color="red">Bạn cần cài đặt một số thông tin trước khi leech</font><br/>
- <a href="set.php" class="button">Bấm vào đây để cài đặt</a>';
- }
- else
- {
- if(!isset($_POST['url']) && !isset($_POST['idcm'])){
- echo '<form action="" method="post">
- Chuyên mục <select name="category">'.$option.'</select><br/>
- Title <input type="text" name="title" value="game"><br/>
- Link<br/>
- <input name="url" type="url" value="" focus="focus"/><br/>
- <input type="submit" value="Leech"/>';
- }
- else
- {
- $url = $_POST['url'];
- $curl = curl_init();
- $ua = 'Mozilla firefox';
- curl_setopt($curl, CURLOPT_USERAGENT, $ua);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl, CURLOPT_COOKIEJAR, 'cookie.txt');
- curl_setopt($curl, CURLOPT_COOKIEFILE, 'cookie.txt');
- curl_setopt($curl, CURLOPT_TIMEOUT, 30);
- curl_setopt($curl, CURLOPT_URL, $url);
- $full_content = curl_exec($curl);
- $title = $_POST['title'];
- preg_match("/<\/span><\/span><\/div>(.*?)<div style=\"clear:both\" id=\"comment\">/is", $full_content, $content);
- $content = str_replace("\r", '', $content[1]);
- $content = str_replace('</div></div><', '<', $content);
- $content = str_replace("\n", '', $content);
- $content = str_replace('<br />', '<br/>', $content) . '</div></div>';
- preg_match_all('/src="(.*?)"/is', $content, $img);
- $img = array_unique($img[1]);
- $i = 1;
- $ua = 'Opera/9.80 (Series 60; Opera Mini/7.0.32400/28.3392; U; vi) Presto/2.8.119 Version/11.10';
- $cookie = 'cookiext.txt';
- $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, AUTOLOGIN);
- curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
- curl_exec($ch);
- }
- curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
- curl_setopt($ch, CURLOPT_URL, 'http://xtgem.com/filebrowser?a=&f=&file=/images');
- $html = curl_exec($ch);
- preg_match('#token=(.*?)&#is', $html, $matches);
- $token = @$matches[1];
- if(!isset($token))
- {
- @unlink($cookie);
- die('Đăng nhập thất bại!');
- }
- $imgn = $img;
- foreach ($img as $j => $image) {
- if($image == 'http://ngheocophongcach.hayday.mobi/android/images/icon_download_light.png'){
- unset($imgn[$j]);
- continue;
- }
- sleep(3);
- $source = file_get_contents($image);
- $ex = end(explode('.', $image));
- $name = rwurl($title) . '-'.$i.'.' . $ex;
- file_put_contents(TW_PATH.'/images/'.$name, $source);
- $images[] = 'http://taivnn.wap.sh/images/' . $name;
- $file = TW_PATH.'/images/'.$name;
- curl_setopt($ch, CURLOPT_URL, 'http://xtgem.com/filebrowser/file_upload?file=/images');
- $html = curl_exec($ch);
- preg_match('#<input type="file" name="filext([a-z0-9]+)" \/>#', $html, $m);
- $filename = 'filext'.$m[1];
- curl_setopt($ch, CURLOPT_URL, 'http://xtgem.com/filebrowser/file_upload_save?__token='.$token.'&file=/images');
- curl_setopt($ch, CURLOPT_POSTFIELDS, array('MAX_FILE_SIZE' => '2097152', $filename => '@'.$file, 'upload_more' => 'y', 'submit' => 'OK'));
- curl_exec($ch);
- $i++;
- }
- $content = str_replace($imgn, $images, $content);
- $content = preg_replace('/<img(.*?)src="(.*?)"(.*?)>/is', "[img]$2[/img]", $content);
- $content = str_replace('[img]http://ngheocophongcach.hayday.mobi/android/images/icon_download_light.png[/img]', '<img src="http://ngheocophongcach.hayday.mobi/android/images/icon_download_light.png" alt="Download"/>', $content);
- $content = preg_replace('/<p class="tags">(.*?)<\/p>/is', '', $content);
- $content = preg_replace('/<div class="content-img"><a(.*?)>\[img\](.*?)\[\/img\]<\/a><\/div>/is', "<div class='content-img'>[img]$2[/img]", $content);
- curl_setopt($curl, CURLOPT_URL, URL_POST);
- curl_setopt($curl, CURLOPT_POSTFIELDS, array('title' => $title, 'text' => $content, 'idc' => $_POST['category'],'page' => '','show' => '1'));
- curl_exec($curl);
- echo 'Leech <b><font color="green">'.$title.'</font></b> thành công<form action="" method="post">
- Chuyên mục <select name="category">'.$option.'</select><br/>
- Title <input type="text" name="title" value="game"><br/>
- Link<br/>
- <input name="url" type="url" value="" focus="focus"/><br/>
- <input type="submit" value="Leech"/>';
- }
- echo '</form>';
- include 'end.php';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement