Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local gpu = component.gpu
- local shell = require("shell")
- local os = require("os")
- -- ============================================================
- -- KONFIGURATION
- -- ============================================================
- -- Welches Programm soll NACH der Animation starten?
- local NEXT_PROGRAM = "/home/REACTOR-CONTROL.lua"
- -- Gesamtdauer der Hauptanimation (Rest für den coolen Launch-Effekt)
- local MAIN_DURATION = 56
- -- ============================================================
- local w, h = gpu.getResolution()
- local logs = {}
- local max_logs = h - 5
- local time_elapsed = 0
- -- Funktion zum zentrierten Zeichnen
- local function drawCentered(y, text, color)
- if color then gpu.setForeground(color) end
- if #text > w then text = string.sub(text, 1, w) end
- local x = math.floor((w - #text) / 2) + 1
- gpu.set(x, y, text)
- end
- -- Linux-Style Zeilen-Renderer (Färbt [ OK ], [ INFO ], etc.)
- local function drawLogLine(x, y, line)
- if #line > (w - x) then
- line = string.sub(line, 1, w - x - 3) .. "..."
- end
- local prefix = string.sub(line, 1, 8)
- if prefix == "[ OK ]" then
- gpu.setForeground(0x55FF55) -- Hellgrün
- gpu.set(x, y, "[ OK ]")
- gpu.setForeground(0xDDDDDD)
- gpu.set(x + 9, y, string.sub(line, 9))
- elseif prefix == "[ INFO ]" then
- gpu.setForeground(0x55FFFF) -- Cyan
- gpu.set(x, y, "[ INFO ]")
- gpu.setForeground(0xDDDDDD)
- gpu.set(x + 9, y, string.sub(line, 9))
- elseif prefix == "[ SCAN ]" then
- gpu.setForeground(0xFFFF55) -- Gelb
- gpu.set(x, y, "[ SCAN ]")
- gpu.setForeground(0xDDDDDD)
- gpu.set(x + 9, y, string.sub(line, 9))
- elseif string.sub(line, 1, 2) == "::" then
- gpu.setForeground(0xFF55FF) -- Magenta für Hauptphasen
- gpu.set(x, y, line)
- else
- gpu.setForeground(0xAAAAAA) -- Standard-Grau
- gpu.set(x, y, line)
- end
- end
- -- Hilfsfunktion zum Zeichnen des Bildschirms (Logs + Progress)
- local function refreshScreen()
- gpu.fill(1, 1, w, h, " ")
- drawCentered(1, "--- OpenOS Advanced Linux-Kernel v5.10-Secure ---", 0x888888)
- local log_y = 3
- for j = math.max(1, #logs - max_logs + 1), #logs do
- if log_y < h - 2 then
- drawLogLine(2, log_y, logs[j])
- log_y = log_y + 1
- end
- end
- -- Fortschrittsbalken (Berechnet auf Basis von 120 Sek Gesamtlaufzeit)
- local percent = math.floor((time_elapsed / 120) * 100)
- if percent > 94 then percent = 94 end -- Deckel für die Log-Phasen
- local bar_width = math.floor(w * 0.8)
- if bar_width < 10 then bar_width = w - 2 end
- local bar_x = math.floor((w - bar_width) / 2) + 1
- local filled = math.floor((percent / 100) * (bar_width - 2))
- local bar_str = "[" .. string.rep("#", filled) .. string.rep(" ", (bar_width - 2) - filled) .. "]"
- gpu.setForeground(0x888888)
- gpu.set(bar_x, h, "BOOT: " .. percent .. "% " .. bar_str)
- end
- -- Echte Hardware einlesen
- local real_components = {}
- for addr, name in component.list() do
- table.insert(real_components, {name = name:upper(), addr = string.sub(addr, 1, 4)})
- end
- local total_comps = #real_components
- local comp_index = 1
- gpu.setBackground(0x000000)
- -- ============================================================
- -- LANGSAME PHASEN 1-3 (Sekunde 1 bis 83 - Takt: 1.0 Sekunde)
- -- ============================================================
- for i = 1, 83 do
- time_elapsed = i
- -- PHASE 1: UPDATE CHECK
- if i == 1 then table.insert(logs, ":: Phase 1: Remote Update Verification...") end
- if i == 3 then table.insert(logs, "[ INFO ] Initializing network interfaces (eth0)...") end
- if i == 5 then table.insert(logs, "[ INFO ] Requesting DHCP broadcast lease...") end
- if i == 8 then table.insert(logs, "[ OK ] Assigned IP 192.168.1.104 on eth0") end
- if i == 12 then table.insert(logs, "[ INFO ] Connecting to update.openos.org:443...") end
- if i == 16 then table.insert(logs, "[ OK ] Manifest signature verified (RSA-4096).") end
- if i == 20 then table.insert(logs, "[ OK ] Component firmware 'opensecurity' is up to date.") end
- -- PHASE 2: HARDWARE SCAN
- if i == 25 then table.insert(logs, ":: Phase 2: Probing Component Hardware Bus...") end
- if i >= 28 and i <= 55 and comp_index <= total_comps then
- local step = math.floor((55 - 28) / total_comps)
- if step < 1 then step = 1 end
- if (i - 28) % step == 0 and comp_index <= total_comps then
- local c = real_components[comp_index]
- table.insert(logs, string.format("[ OK ] Found device: %s [ID: %s]", c.name, c.addr))
- comp_index = comp_index + 1
- end
- end
- if i == 58 then table.insert(logs, "[ OK ] Hardware bus scan finished. Devices locked.") end
- -- PHASE 3: VIRENCHECK
- if i == 62 then table.insert(logs, ":: Phase 3: Launching System Integrity & Malware Scan...") end
- if i == 65 then table.insert(logs, "[ SCAN ] Checking core directories for modifications...") end
- if i == 68 then table.insert(logs, "[ SCAN ] /bin/checksums ... SECURE") end
- if i == 72 then table.insert(logs, "[ SCAN ] /lib/modules ... SECURE") end
- if i == 76 then table.insert(logs, "[ SCAN ] /boot/eeprom.bin ... SIGNATURE OK") end
- if i == 80 then table.insert(logs, "[ INFO ] Anti-Malware Database Version: 2026.06.08") end
- if i == 82 then table.insert(logs, "[ OK ] Integrity Check: 0 Threats detected.") end
- refreshScreen()
- os.sleep(1.0)
- end
- -- ============================================================
- -- HYPER-SPEED PHASE 4: LINUX SERVICES (Dauer: 30 Sek - Takt: 0.1 Sek)
- -- ============================================================
- table.insert(logs, ":: Phase 4: Initializing Linux System Services (Hyper-Drive)...")
- local fast_services = {
- "Systemd-Journald", "Kernel-Variables", "Security-Framework", "Network-Time-Sync",
- "Crypto-Accelerator", "RFID-Driver-Stack", "Biometric-Handlers", "Perimeter-Sensors",
- "Maglock-Bridges", "Hardware-RNG", "Thermal-Monitor", "Motion-Detectors",
- "Keypad-Matrix", "Sound-Mixer", "Virtual-Terminal-1", "Virtual-Terminal-2",
- "Storage-Optimization", "OpenSecurity-Core", "Card-Reader-Bus", "Alarm-Siren-Daemon",
- "Laser-Grid-Controller", "DNA-Sequencer-Link", "Retina-Scanner-Sync", "Door-Lock-Registry",
- "Event-Logger-Service", "TTY-Listener", "IPC-Message-Bus", "User-Runtime-Directory",
- "System-D-Bus", "Policy-Kit-Daemon", "Cron-Scheduler", "Audit-Daemon", "AppArmor-Profiles"
- }
- -- 30 Sekunden bei 0.1s Taktung = Genau 300 schnelle Textzeilen!
- for step = 1, 300 do
- time_elapsed = 83 + (step * 0.1)
- -- Alle 8 Ticks einen neuen Hauptdienst durchwechseln, dazwischen Unter-Prozesse simulieren
- local svc_idx = math.floor((step - 1) / 8) + 1
- local sub_step = (step - 1) % 8
- local svc_name = fast_services[svc_idx] or "Security-Module-Extension-" .. step
- if sub_step == 0 then
- table.insert(logs, "[ INFO ] Activating " .. svc_name .. " Subsystem...")
- elseif sub_step == 2 then
- table.insert(logs, "[ SCAN ] Verifying integrity signatures for " .. svc_name .. "...")
- elseif sub_step == 4 then
- table.insert(logs, "[ OK ] Allocated secured memory blocks for " .. svc_name .. ".")
- elseif sub_step == 6 then
- table.insert(logs, "[ OK ] Registered core environment hooks for " .. svc_name .. ".")
- elseif sub_step == 7 then
- table.insert(logs, "[ OK ] Started " .. svc_name .. ".")
- end
- refreshScreen()
- os.sleep(0.1)
- end
- -- ============================================================
- -- NEU: PHASE 4.5 - BETRIEBSSYSTEM ERFOLGREICH GESTARTET (2 Sekunden)
- -- ============================================================
- gpu.fill(1, 1, w, h, " ")
- local mid_y = math.floor(h / 2)
- -- Edler, zentrierter Status-Bildschirm
- drawCentered(mid_y - 2, "========================================", 0x00FF00)
- drawCentered(mid_y - 1, " STATUS: SYSTEM BOOT COMPLETE", 0x00FF00)
- drawCentered(mid_y, "========================================", 0x00FF00)
- drawCentered(mid_y + 2, "OpenOS Kernel v5.10-Secure fully loaded.", 0xAAAAAA)
- drawCentered(mid_y + 3, "All security sandboxes are operational.", 0xAAAAAA)
- os.sleep(2.0) -- Exakt 2 Sekunden Haltezeit
- -- ============================================================
- -- PHASE 5: COOL LAUNCH EFFEKT (Exakt 5 Sekunden)
- -- ============================================================
- gpu.fill(1, 1, w, h, " ")
- local box_w = math.min(w - 2, 38)
- local box_h = 5
- if box_w < 15 then box_w = w end
- local box_x = math.floor((w - box_w) / 2) + 1
- local box_y = math.floor((h - box_h) / 2) + 1
- -- Neon-Cyan farbene Box
- gpu.setForeground(0x00FFFF)
- gpu.set(box_x, box_y, "+" .. string.rep("-", box_w - 2) .. "+")
- for ey = 1, box_h - 2 do
- gpu.set(box_x, box_y + ey, "|")
- gpu.set(box_x + box_w - 1, box_y + ey, "|")
- end
- gpu.set(box_x, box_y + box_h - 1, "+" .. string.rep("-", box_w - 2) .. "+")
- local prog_display = NEXT_PROGRAM
- if #prog_display > box_w - 4 then
- prog_display = "..." .. string.sub(NEXT_PROGRAM, #NEXT_PROGRAM - (box_w - 8))
- end
- -- 5-Sekunden-Blinkschleife (5 Durchgänge à genau 1 Sekunde)
- for flash = 1, 5 do
- drawCentered(box_y + 1, "EXECUTE PROGRAM:", 0x00FFFF)
- drawCentered(box_y + 2, "> " .. prog_display .. " <", 0xFFFFFF)
- os.sleep(0.7)
- gpu.set(box_x + 1, box_y + 1, string.rep(" ", box_w - 2))
- gpu.set(box_x + 1, box_y + 2, string.rep(" ", box_w - 2))
- os.sleep(0.3)
- end
- -- Bildschirm leeren und Übergabe
- gpu.setBackground(0x000000)
- gpu.setForeground(0xFFFFFF)
- gpu.fill(1, 1, w, h, " ")
- shell.execute(NEXT_PROGRAM)
Advertisement
Add Comment
Please, Sign In to add comment