Password Check

Password Check

password.rb

Do you think your password is secure? Muahahaha!!! I'm just kidding; I don't know if your password is secure or not, but this script will give you a pretty good idea. It is based on mathematical proofs—and the numbers don't lie! Give this script a shot, making sure nobody is looking over your shoulder when you run it since your password won't be masked. Note that dictionary-based attacks aren't incorporated in the output; only entropy and brute force are addressed.

The Code

 unless ARGV[0]
     puts "You need to include a password to test."
     puts "Usage: ruby password.rb mySuperSecretPassword"
     exit
 end

 password = ...

Get Wicked Cool Ruby Scripts now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.