Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local isColour = term.isColour()
- term.clear()
- term.setCursorPos(1,1)
- term.setBackgroundColour(colours.blue)
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColour(colours.white)
- if isColour == true then
- term.write("ADVANCED PASSWORD UTILITY SETUP")
- term.setCursorPos(1,3)
- term.write("This setup will install Advanced Password Utility")
- term.setCursorPos(1,4)
- term.write("onto your computer. By continuing through this")
- term.setCursorPos(1,5)
- term.write("setup, you agree to never redistribute the utility")
- term.setCursorPos(1,6)
- term.write("nor the setup. You will also agree to never alter")
- term.setCursorPos(1,7)
- term.write("and share the setup utility in any way, shape or")
- term.setCursorPos(1,8)
- term.write("form, be that electronically or physically.")
- term.setCursorPos(1,9)
- term.setTextColour(colours.yellow)
- term.write("To begin installation, press Enter/Return")
- term.setCursorPos(1,10)
- term.write("To exit the installation, press F1")
- term.setTextColour(colours.grey)
- term.setCursorPos(1,18)
- term.write("Version 1.2")
- else
- shell.run("pastebin get tvYEAjbq")
- print("Enter desired passcode: ")
- local passcode = read("*")
- print("Confirm passcode: ")
- local passcode2 = read("*")
- if passcode == passcode2 then
- print("Setup complete. Restarting")
- sleep(1)
- os.reboot()
- else
- print("Password is incorrect. Please try setup again")
- end
- end
- function setup()
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColour(colours.white)
- shell.run("pastebin get tvYEAjbq startup")
- term.write("ADVANCED PASSWORD UTILITY SETUP")
- term.setCursorPos(1,3)
- term.write("Please enter your password, then press Enter")
- local pwFileExist = fs.exists("password")
- if pwFileExist == true then
- term.setCursorPos(1,10)
- term.setTextColour(colours.red)
- term.write("WARNING! Password file already exists,")
- term.setCursorPos(1,11)
- term.write("overwriting it!")
- end
- local filename = 'password'
- local userfile = fs.open(filename, 'a')
- term.setCursorPos(1,4)
- term.setBackgroundColour(colours.black)
- term.write(" ")
- term.setCursorPos(1,4)
- input = read("*")
- --aesInput = encryption.encrypt("password",input.."1qAzT53G")
- term.setCursorPos(1,5)
- term.setBackgroundColour(colours.blue)
- userfile.writeLine(input)
- userfile.close()
- term.setCursorPos(1,6)
- term.write("Setup is complete. Rebooting in 2 seconds")
- sleep(2)
- os.reboot()
- end
- local sEvent, param = os.pullEvent("key")
- if sEvent == "key" then
- if param == 28 then
- setup()
- elseif param == 59 then
- shell.run("rm startup")
- term.setBackgroundColour(colours.black)
- term.clear()
- term.setCursorPos(1,1)
- term.write("Advanced Password Utility setup was cancelled")
- term.setCursorPos(1,2)
- sleep(0.5)
- shell.run("rom/programs/shell")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement