Guest User

Untitled

a guest
Jan 28th, 2014
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #!/usr/bin/ruby
  2.  
  3. words = [ '!','#','$','%','0','1','2','3','4','5','6','@','A','B','C','D','E','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','W','X','Y','Z','a','b','c','d','e','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','w','x','y','z' ]
  4.  
  5. min_words= 5
  6. max_words = 12 #maximum length of generated words
  7.  
  8. def test(passphrase)
  9. puts passphrase.inspect
  10. end
  11.  
  12. (1..max_words).each do |n_words|
  13.  
  14. words.permutation(n_words).each { |p| test p.join }
  15.  
  16. end
Advertisement
Add Comment
Please, Sign In to add comment