Advertisement
Guest User

lockdown

a guest
Feb 19th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.40 KB | None | 0 0
  1. --LOCKDOWN
  2. function c()
  3.   term.clear()
  4.   term.setCursorPos(1, 1)
  5. end
  6.  
  7. local password = "Forcefield16"
  8. local adminPassword = "jetblue74"
  9. local uPassword
  10. local uAdmin
  11.  
  12. print("LOCKDOWN")
  13. print("Be sure that essential personnel are in position!")
  14. print("This function requires the admin key!")
  15. os.sleep(2)
  16. c()
  17.  
  18. print("Two-factor authentication required!")
  19. term.write("Password: ")
  20. uPassword = read("*")
  21. c()
  22. term.write("Admin Master Password: ")
  23. uAdmin = read("*")
  24. c()
  25. print("Bypassing Admin Firewall...")
  26. os.sleep(4)
  27. c()
  28. if (uPassword == password) and (uAdmin == adminPassword) then
  29.   local endPassword
  30.   local done = false
  31.   print("*Firewall Bypassed*")
  32.   os.sleep(2)
  33.   c()
  34.   print("Press any key to CONFIRM LOCKDOWN")
  35.   read()
  36.   while not done do
  37.     rs.setOutput("back", true)
  38.     print("LOCKDOWN IN PROGRESS!")
  39.     term.write("Master override key: ")
  40.     endPassword = read("*")
  41.     c()
  42.     if endPassword == uAdmin then
  43.       print("Terminating lockdown...")
  44.       os.sleep(2)
  45.       rs.setOutput("back", false)
  46.       c()
  47.       print("Lockdown Terminated!")
  48.       done = true
  49.       os.sleep(2)
  50.       os.reboot()
  51.     else
  52.       print("Incorrect password!")
  53.       print("The master admin key is required to terminate a lockdown!")
  54.       os.sleep(3)
  55.       done = false
  56.     end
  57.   end
  58. else
  59. print("Your two factor authentication failed!")
  60. print("Goodbye!")
  61. os.sleep(3)
  62. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement