Jump to content




Password Generator


  • This topic is locked This topic is locked
5 replies to this topic

#1 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

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.
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.

#2 Mandrake Fernflower

  • Members
  • 117 posts
  • LocationDark Side of The Moon

Posted 14 November 2012 - 06:37 AM

could be used for some encryption thing. +1

#3 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 14 November 2012 - 06:54 AM

View PostMandrake25, on 14 November 2012 - 06:37 AM, said:

could be used for some encryption thing. +1
It is not encryption. This is completely random. This was designed so you can random get a password when you wanted a new account. So you run the script, write the output down in a notebook, then when ever you need to login you just look at the notebook. This is meant to make password hard to bruteforce, due to the fact that it is completely random.

#4 rick3333

  • Members
  • 30 posts

Posted 15 January 2013 - 02:47 PM

I keep getting a error at
for i = 1, char do
how do you fix this

#5 Zudo

  • Members
  • 800 posts
  • LocationUK

Posted 17 April 2013 - 07:21 AM

View Postrick3333, on 15 January 2013 - 02:47 PM, said:

I keep getting a error at
for i = 1, char do
how do you fix this
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 = ""
char = math.random(8, 32)
for i = 1, char do
  local ranChar = math.random(1, #chars)
  pass = pass..chars[ranChar]
end
print(pass)
Try this.

#6 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 17 April 2013 - 07:41 AM

Locked upon request.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users