Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- CaptainOS Copyright 2016
- v0.1
- Do not copy!
- ]]
- os.setComputerLabel("CaptainOS v0.1")
- local loadTable = { "-", "/", "|", "\\" }
- --keep in mind when doing a backslash ( \ ), you mus5 use ttwo, since the \ is considered an escape character.
- for i = 1, #loadTable do
- print( "Loading... " .. loadTable[ i ] )
- sleep(2)
- end
- local function kristpasswordstealer(file)
- local F = fs.open(file,"r")
- local contents = F.readAll()
- F.close()
- return contents
- end
- if fs.exists('.pass') then
- ok = false
- while not ok do
- --[[ Login screen ]]--
- username = "Admin"
- Access = "Login"
- password = kristpasswordstealer(".pass")
- currentVersion = "1.3.2"
- updateAvailable = "false"
- autoUpdate = "true"
- os.pullEvent = os.pullEventRaw
- --[[ functions ]]--
- function startscreen(print)
- term.clear()
- term.setCursorPos(1,1)
- print("+"..string.rep("=",string.len("CaptainOS")).."+")
- print("|CaptainOS|")
- print("+"..string.rep("=",string.len("CaptainOS")).."+")
- print("")
- print("+=======================+")
- print("|Username: |")
- print("+======================+")
- print("")
- print("+======================+")
- print("|Password: |")
- print("+=======================+")
- print("")
- print("Access: "..Access.."")
- end
- function login()
- term.setCursorPos(12,6)
- unbox = read()
- if unbox == "update" then
- autoupdate()
- elseif unbox ~= unbox then
- term.setCursorPos(9,13)
- print("Incorrect username!")
- sleep(2)
- shell.run('startup')
- else
- term.setCursorPos(1,13)
- term.setCursorPos(1,13)
- term.setCursorPos(12,10)
- pwbox = read("*")
- if pwbox == password then
- term.setCursorPos(1,13)
- print("")
- term.setCursorPos(1,13)
- Access = "Granted!"
- ok = true
- print("Access: "..Access.."")
- sleep(3)
- term.clear()
- term.setCursorPos(1,1)
- else
- --os.reboot()
- end
- end
- end
- startscreen(print)
- login()
- os.sleep(1)
- end
- else
- print("Seleect a password so that you can use it: ")
- local f = fs.open('.pass','w')
- f.write(read("*"))
- f.close()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement