resaloli

wizard

Jul 17th, 2013
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. print("What Password you want?")
  2. local pass = read("*")
  3. print("What side is the door?")
  4. local side = read()
  5. print("What is the time the door keeps open in seconds?")
  6. local time = read()
  7. print("What is the admin Password?")
  8. local admin = read("*")
  9. fs.copy("/disk/pass", "/disk/installer")
  10. sleep(3);
  11. file = fs.open("/disk/installer", "r")
  12. local content = file.readAll()
  13. print("done reading")
  14. file.close()
  15. if file then
  16.     print("Colecting Stuff...")
  17.     local stuff = "local password = "..[["]]..pass..[["]]
  18.     local stuff1 = "local side = "..[["]]..side..[["]]
  19.     local timer = "local opentime = "..time
  20.     local adminpass = "local admin = "..[["]]..admin..[["]]
  21.     print("Organizing stuff")
  22.     local content = stuff .. '\n' .. stuff1 .. '\n' .. timer .. '\n' .. adminpass .. '\n' .. content
  23.     print("Preparing file")
  24.     file = fs.open("/disk/installer", "w")
  25.     print("Writing Stuff")
  26.     file.write(content)
  27.     print("Closing file")
  28.     file.close()
  29.     print("Instaling File")
  30.     fs.copy("/disk/installer", "/startup")
  31.     print("Cleaning temp files")
  32.     fs.delete("/disk/installer")
  33.     print("Restarting")
  34.     sleep(2)
  35.     os.reboot()
  36.     print("Done instaling security program")
  37. end
Add Comment
Please, Sign In to add comment