daily pastebin goal
61%
SHARE
TWEET

LoginServer

a guest Feb 13th, 2018 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. modem=peripheral.wrap("back")
  2. modem.closeAll()
  3. modem.open(753)
  4. local memes, are, kings, note, user = os.pullEvent("modem_message")
  5. --if are == 753 and kings == 921 then
  6. local test = fs.exists("login/"..user)
  7. if test == false then
  8.     modem.transmit(123, 753, "Error404")
  9. --modem.close(753) 
  10. shell.run("startup")
  11. end
  12. file = fs.open("login/"..user,"r")
  13. local fileData = {}
  14. repeat
  15. table.insert(fileData,line)
  16. line = file.readLine()
  17. until line == nil
  18. local password = fileData[2]
  19. file.close()
  20. sleep(1)
  21. modem.transmit(123, 456, password)
  22. modem.close(753)
  23. shell.run("startup")
  24. --else
  25. --shell.run("startup")
  26. --end
RAW Paste Data
Top