Advertisement
Wyvern67

Ordinateur protégé

Jan 25th, 2013
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. function tclear()
  2.     term.clear()
  3.     term.setCursorPos(1,1)
  4. end
  5.  
  6. os.pullEvent = os.pullEventRaw
  7. os.loadAPI("sha1")
  8. local pw = ""
  9. local passHash = "93ef5dde44b5cb1d8f3795982ee918c64b7114f6"
  10. local running = true
  11. while running == true do
  12.    tclear()
  13.    write("Entrez le mot de passe:")
  14.    pw = read()
  15.    pw = sha1(pw)
  16.    if pw == passHash then
  17.       tclear()
  18.       print("Acces autorise.")
  19.       running = false
  20.    end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement