This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 6th, 2012  |  syntax: Ruby  |  size: 1.17 KB  |  views: 724  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Run script in the same directory as combo_not.txt file.
  2.  
  3. #!/usr/bin/env ruby
  4. require 'digest/sha1'
  5. require 'rubygems'
  6. require 'highline/import'
  7.  
  8. puts "reading hashes..."
  9. data = File.read("combo_not.txt").split("\r\n")
  10. while true do
  11.   begin
  12.     pass = ask("LinkedIn password: ") {|q| q.echo = false}
  13.     pass = Digest::SHA1.hexdigest(pass)
  14.     match = false
  15.     if data.include?(pass)
  16.       puts "yup: #{pass}"
  17.     else
  18.       10.times do |i|
  19.         if data.include?("#{"0" * (i + 1)}#{pass[i + 1,pass.length]}")
  20.           match = true
  21.           puts "yup: #{"0" * (i + 1)}#{pass[i + 1,pass.length]}"
  22.           break
  23.         end
  24.       end
  25.       if !match
  26.         data.each {|hash|
  27.           next if hash !~ /0000/
  28.           orig = hash
  29.           hash = hash.split("0000").delete_if {|item| !item || item.length < 5}
  30.           hash.each {|part|
  31.             if pass =~ /#{part}/
  32.               puts "maybe: #{orig}"
  33.               match = true
  34.               break
  35.             end
  36.           }
  37.           break if match
  38.         }
  39.         puts "nope...but change your password anyway" if !match
  40.       end
  41.     end
  42.   rescue Exception
  43.     puts ""
  44.     break
  45.   end
  46. end
clone this paste RAW Paste Data