OC-PsychOS/modules/applications/login.lua

15 lines
267 B
Lua

function login()
if _G.PASS_HASH and _G.PASS_SALT then
io.write("\f")
io.write(_G.MOTD.."\nPassword: ")
local pt = io.read()
if pt then
if sha.sha256(pt.._G.PASS_SALT) == _G.PASS_HASH then
return true
end
end
return false
end
return true
end