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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.