Guest User

Untitled

a guest
Oct 6th, 2016
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. rednet.open("back")
  2. print("Connecting to Bank server 1...")
  3. rednet.send(32,"Connect","bank1")
  4. local id, message = rednet.receive("bank1",10)
  5. if id then
  6. if id == 32 then
  7. if message == "Connection step 1" then
  8. rednet.send(32,"Connection confirmed","bank1")
  9. print("Established connection!")
  10. print("Please login")
  11. write("Username:")
  12. local input = read()
  13. rednet.send(32,input,"bank1")
  14. write("Password:")
  15. local input = read("*")
  16. rednet.send(32,input,"bank1")
  17. local id, message = rednet.receive("bank1",5)
  18. if id then
  19. if id == 32 then
  20. print(message)
  21. if message == "Access granted." then
  22. while true do
  23. local event, button, x, y = os.pullEvent( "mouse_click" )
  24. if x > 0 and x <= 7 then
  25. rednet.send(32,"Balance","bank1")
  26. local id, message = rednet.receive("bank1")
  27. elseif x > 8 and x <= 12 then
  28. rednet.send(32,"Exit","bank1")
  29. break
  30. end
  31. end
  32. else
  33. print("Access denied.")
  34. return
  35. end
  36. else
  37. print("Hijacking detected! Connection blocked.")
  38. return
  39. else
  40. print("Connection timed out.")
  41. return
  42. end
  43. end
  44. else
  45. print("Hijacking detected! Connection blocked.")
  46. return
  47. end
  48. else
  49. print("Connection failed.")
  50. return
  51. end
Add Comment
Please, Sign In to add comment