Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- write("Username: ")
- status, username = pcall(read)
- file = fs.open("/etc/passwd/"..username, "r")
- if (file == nil or file.readAll() == "") then
- error("User "..username.." does not exist.")
- end
- write("Password: ")
- status, password = pcall(read, "*")
- testhash = sha256.sha256(password)
- passhash = file.read()
- if (testhash == passhash) then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement