local system = {
files = {
["hint.txt"] = {
content = ".hsilgnE ni `kcolnu` dellac si `gnikcolnu` ,yltnerappA ?wonk uoy diD",
original = "Did you know? Apparently, `unlocking` is called `unlock` in English.",
lock = true,
time = "2000/12/05"
},
["memo.txt"] = {
content = "emergency decote keyword: 'unlock'",
lock = false,
time = "2000/12/05"
}
}
}
local bios = {
name = "compiler@io.bios",
number = "397619"
}
local OS = {
name = "compiler.original.OS",
vertion = "1.0.0",
up = "1980/05/03"
}
setmetatable(system, { __index = function(t, key)
return ">>ERROR: '" .. tostring(key) .. "' は無効な命令です"
end })
local commands = {}
commands.files = function()
print("--- SYSTEM FILES ---")
for name, data in pairs(system.files) do
print(string.format(" %-12s [%s]", name, data.time))
end
end
-- OS情報
commands.os = function()
print("---- OS INFORMATION ----")
print("OS NAME: " .. OS.name)
print("OS VERSION: " .. OS.vertion)
print("OS LAST UPDATE: " .. OS.up)
end
commands.bios = function()
print("--- BIOS INFORMATION ---")
print("BIOS NAME: " .. bios.name)
print("BIOS MODEL NUMBER: " .. bios.number)
end
commands.clear = function()
print(string.rep("\n", 50))
end
commands.cat = function()
io.write("ENTER FILENAME: ")
io.flush()
local target = io.read():lower()
local file = system.files[target]
if file then
print("----------------------------")
print("CONTENT: " .. file.content)
if file.lock then
print(">>WARNING: THIS FILE IS ENCRYPTED.")
end
print("----------------------------")
else
print(">>ERROR: ファイルが見つかりません")
end
end
commands.decrypt = function()
io.write("DECRYPT.TARGET: ")
io.flush()
local target = io.read():lower()
local file = system.files[target]
if target == "exit" or target == "" then
print("-- DECRYPT CANCELLED --")
elseif file and file.lock then
print("ENCRYPTION DETECTED: " .. file.content)
io.write("ENTER DECRYPTION KEY: ")
io.flush()
local key = io.read():lower()
if key == "unlock" then
file.lock = false
file.content = file.original
print(">>SUCCESS: DATA RESTORED.")
print(">>FILE CONTENT: ")
print(file.content)
else
print(">>ERROR: INVALID KEY.")
end
else
print(">>ERROR: TARGET NOT LOCKED OR NOT FOUND")
end
end
print("------ BIOS SETUP UTILITY ------")
print("system@admin: BIOS SETUP COMMANDS")
print(">>FILES, OS, BIOS, CAT,")
print(">>DECRYPT, CLEAR, EXIT")
while true do
io.write("\nADMIN@ROOT: ")
io.flush()
local input = io.read()
if input == nil then break end
local cmd = input:lower()
if cmd == "exit" then
print("-- SYSTEM SHUTDOWN…--")
break
elseif commands[cmd] then
commands[cmd]()
else
print(system[cmd])
end
end
To embed this project on your website, copy the following code and paste it into your website's HTML: