Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. while true do
  2. event, modemSide, senderChannel1, replyChannel1, user = os.pullEvent("modem_message") -- User = specific user, senderChannel =
  3. if (event ~= "modem_message") then
  4. os.reboot()
  5. end
  6. modem.transmit(replyChannel1, 0, "Processing Request")
  7. if (senderChannel1 == 1) then
  8. --code
  9. end
  10. if(senderChannel1 == 2) then
  11. pass = samePC(replyChannel1)
  12. if(fs.exists(user) == true) then
  13. login = fs.open(user .."/pass", "r")
  14. temp = login.readLine()
  15. login.close()
  16. if (temp == pass) then
  17. modem.transmit(replyChannel1, 0, 1) -- Password correct
  18. else
  19. modem.transmit(replyChannel1, 0, 2) -- Password incorrect
  20. end
  21. else
  22. modem.transmit(replyChannel1, 0, 0) -- user doesn't exist error
  23. end
  24. end
  25. --etc
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement