Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Password Generator
03-24-2010, 01:16 AM (This post was last modified: 03-24-2010 01:27 AM by nevets04.)
Post: #1
Code:
[code]
print "How many characters do you want in your password?: "
characters = gets.chomp
puts "1) Yes"
puts "2) No"
print "Do you want numbers?: "
numbers = gets.chomp
characters = characters.to_i
numbers = numbers.to_i
if numbers == 2
    while 0 < characters
        characters = characters - 1
        password = (?a.ord + rand(26)).chr
        print password
    end
end
if numbers == 1
    characters = characters / 2
    while 0 < characters
        characters = characters - 1
        password = (?a.ord + rand(26)).chr
        passwordnumber = rand(10)
        print password, passwordnumber
    end
end
puts ""
Visit this user's website Find all posts by this user
Quote this message in a reply
05-09-2010, 06:19 PM
Post: #2
Sorry for bumping, but this is useful thanks !
Find all posts by this user
Quote this message in a reply
05-20-2010, 10:51 PM
Post: #3
I'll try it. Thanks for it ;)
Find all posts by this user
Quote this message in a reply
05-23-2010, 04:07 PM
Post: #4
I will try for sure. Thanks for the share.

(05-24-2010 09:15 PM)Omniscient Wrote:  We take HF refugees in bulk.
Lol
Find all posts by this user
Quote this message in a reply
05-23-2010, 04:50 PM
Post: #5
(03-24-2010 01:16 AM)nevets04 Wrote:  
Code:
[code]
print "How many characters do you want in your password?: "
characters = gets.chomp
puts "1) Yes"
puts "2) No"
print "Do you want numbers?: "
numbers = gets.chomp
characters = characters.to_i
numbers = numbers.to_i
if numbers == 2
    while 0 < characters
        characters = characters - 1
        password = (?a.ord + rand(26)).chr
        print password
    end
end
if numbers == 1
    characters = characters / 2
    while 0 < characters
        characters = characters - 1
        password = (?a.ord + rand(26)).chr
        passwordnumber = rand(10)
        print password, passwordnumber
    end
end
puts ""

good work friend! Blackhat

My informational thread on how to become HQ
[Image: 3af27e76.png]
"An eye for an eye and the whole world would be blind"
Visit this user's website Find all posts by this user
Quote this message in a reply
05-23-2010, 05:03 PM
Post: #6
Thank you man, I am going to check it out.
Visit this user's website Find all posts by this user
Quote this message in a reply
06-18-2010, 05:42 PM
Post: #7
This is very usefull thanks for the source code.
Find all posts by this user
Quote this message in a reply
10-06-2010, 07:59 PM
Post: #8
I am trying now, but so far it seems like there have been good results.
Find all posts by this user
Quote this message in a reply
11-01-2010, 12:11 PM
Post: #9
I'm going to check and test it out soon, but thanks for sharing. Much appreciated!
Find all posts by this user
Quote this message in a reply
12-14-2010, 01:56 AM
Post: #10
Good work keep it up
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)