Created
August 26, 2016 02:02
-
-
Save alexdovzhanyn/f090da74af31835b42288f6d4072a17f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
characters = ('a'..'z').to_a + ('0'..'9').to_a + ["!", "@", "#", "$", "%", "^", "&", "*",] | |
password = "" | |
print "How long should your password be? " | |
len = gets.chomp.to_i | |
len.times{n = rand(0..43); password += characters[n].to_s;} | |
puts password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment