Skip to content

Instantly share code, notes, and snippets.

@aktowns
Created June 7, 2012 03:14
Show Gist options
  • Save aktowns/2886303 to your computer and use it in GitHub Desktop.
Save aktowns/2886303 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'digest/sha1'
sums=File.open('SHA1.txt', 'r') {|fp| fp.read.downcase.split("\n")}
while true
pa = Digest::SHA1.hexdigest(gets().strip).downcase
puts sums.include?(pa) ? "Password is in dump, not decrypted" \
: sums.include?(pa.gsub(/^.{5}/,'00000')) ? "Password exists and has been decrypted" \
: "All good!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment