is it possible to make a script that makes password for users i have thinking to change password for all users every year
for password i wood like to have it like this 8 characters then the year like this dhe45srt-2007 hope you now what i mean
:)
Here's random code
Generate = function(n)
local t,i,r,e1,e2,_
local s = ""
t = { "48-57","65-90","97-122"}
for i=1,n do
r = math.random(1,table.getn(t))
_,_,e1,e2 = string.find(t[r],"(%d+)%-(%d+)")
s = s..string.char(math.random(e1,e2))
end
return(s)
end
Use Generate(x), where x is the number of characters you want.
Best regards,
Why not put ASCII ranges to an array inside the "big" array and unpack the "little" array after randomly choosing it from the "big" one?
math.random(unpack(arr))
local r = math.random(#t)
What does "#" means?
#t is the number of elements in array t. It used to be table.getn(t)
Quote from: bastya_elvtars on 22 August, 2007, 02:54:23
#t is the number of elements in array t. It used to be table.getn(t)
Thanks ;) ;)
table.maxn gets the highest numerical index from "mixed" tables(e. g. {["a"]=b, "c","d"}) too. Of course this is achieved via iterating through the table, so it's really slow and should only be used when really necessary (that is, for tables like the one I posted above).
what i mean is if it's possible to make a script that gennerate password ex.
if you reg a user you go to this script an it makes a password for the user whit rigtclick that you can use to reg the user :)
can't find it :)
can somebody post this script her cant find it Auto-Pass 1.0 LUA 5.0/5.1
:)
Google is for us: http://lua.uknnet.com/thread.php?threadid=1878&sid=0270f31d0cbd58856b6f71f888112bfa
thanks :)