Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --local arg = { ... }
- --local pkt = arg[1]
- --local pData = pkt[2]
- local pData = {
- cody,
- pass,
- }
- function generateKey()
- local str = ""
- local all = {"0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g", "h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","!","#","$","%","&","/","(",")","="}
- local from = from or all
- for i=1, 10 do
- str = str..from[math.random(1, #all)]
- end
- return str
- end
- local file = fs.open("/database/users", "r")
- local dat = file.readAll()
- users = textutils.unserialize(dat)
- file.close()
- if users.pData[1] == nil then
- print("[MountianLion Mail] [Login] [userNotExist]")
- data = false
- else
- if users.pData[1] == pData[2] then
- uKey = generateKey()
- print("[MountianLion Mail] [Login] [Generated Key] [" .. uKey .. "]")
- data = uKey
- else
- print(users.pData[1])
- print("[MountianLion Mail] [Login] [Failed]")
- data = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement