Skip to content

Instantly share code, notes, and snippets.

@gen0cide
Forked from jc00ke/checker.rb
Created September 4, 2012 17:19
Show Gist options
  • Save gen0cide/3623730 to your computer and use it in GitHub Desktop.
Save gen0cide/3623730 to your computer and use it in GitHub Desktop.
Ruby script to find password in LinkedIn leak, if present.
#!/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