Posted 13 November 2012 - 07:37 PM
This script was created as a request from my friend.
The script will randomly print a string of chosen length or random if the argument says "ran", of random letters, numbers and basic symbols.
Note: I do realize how simple this is however, I find it useful to use if you want to be safe. I also do not plan on updating this since it is so simple.
The script will randomly print a string of chosen length or random if the argument says "ran", of random letters, numbers and basic symbols.
local args = {...}
local chars = {"a", "A", "b", "B", "c", "C", "d", "D", "e", "E", "f", "F", "g", "G", "h", "H", "i", "I", "j", "J", "k", "K", "l", "L", "m", "M", "n", "N", "o", "O", "p", "P", "q", "Q", "r", "R", "s", "S", "t", "T", "u", "U", "v", "V", "w", "W", "x", "X", "y", "Y", "z", "Z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "!", "@", "-", "_", "#", "%", "$", "*", "+"}
local pass = ""
if args[1] ~= "ran" then
char = tonumber(args[1])
else
char = math.random(8, 32)
end
for i = 1, char do
local ranChar = math.random(1, #chars)
pass = pass..chars[ranChar]
end
print(pass)
I realize this could of been done with "string.char()" however, I got lazy and I only wanted chars that ALMOST every keyboard has. You can edit out the "$" in the table if your keyboard does not support this. Note: I do realize how simple this is however, I find it useful to use if you want to be safe. I also do not plan on updating this since it is so simple.