Created
June 6, 2012 17:20
-
-
Save jc00ke/2883396 to your computer and use it in GitHub Desktop.
Ruby script to find password in LinkedIn leak, if present.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'digest/sha1' | |
if ARGV[0].nil? | |
puts "Usage: checker [password]" | |
puts "Checks the LinkedIn password file for a SHA-1 match of the provided password." | |
exit 1 | |
end | |
sha = Digest::SHA1.hexdigest(ARGV[0]) | |
File.open('combo_not.txt').each_line.with_index do |line, idx| | |
line.strip! | |
if sha === line || "00000#{sha[5..-1]}" === line | |
puts " Line: #{idx}" | |
puts " Content: #{line}" | |
puts "Provided: #{sha}" | |
exit | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment