MrKey2b

pass

Mar 28th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. local internet   = require("internet")
  2. local component  = require("component")
  3. local sides      = require("sides")
  4. local event      = require("event")
  5. local fs         = require("filesystem")
  6. local term       = require("term")
  7. local computer   = require("computer")
  8. local shell      = require("shell")
  9.  
  10. --Debut prog
  11. if fs.exists('/lib/json.lua') == false then
  12.   shell.execute('wget -fq "https://pastebin.com/raw/4UWzY19u" "/lib/json.lua"')
  13. end
  14. local json = require("json")
  15.  
  16.   local shrc = io.open("/home/.shrc","a")
  17.   shrc:write("/home/pass.lua")
  18.   shrc:close()
  19.   computer.shutdown(true)
  20. end
  21. shell.execute("clear")
  22. print("Login session MrKey2b")
  23. print("")
  24. print("Password :")
  25. print("")
  26. local ok, Password = pcall(term.read, { dobreak = false, pwchar = "*" })
  27. if ok then
  28. Password = string.sub(Password, 1, #Password - 1)
  29. end
  30. if Password == "admin" then
  31. shell.execute("clear")
  32. print("Password Accepted")
  33. else
  34. print("Password Denied")
  35. os.sleep(1.5)
  36. computer.shutdown(true)
  37. end
Advertisement
Add Comment
Please, Sign In to add comment