GithubHelp home page GithubHelp logo

bozocrack's People

Contributors

juuso avatar mic92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bozocrack's Issues

No web interface

A simple and effective MD5 cracker needs a simple and effective web interface. (In PHP of course!)

Hardly an issue with MD5, more an issue with lack of salting.

This script doesn't really show issues with MD5 but more silly programmers who don't salt their hashes.
Search for a SHA-512 hash of a word and chances are you'll find it (perhaps not as frequently as MD5 but then again MD5 is more popular).

So with that in mind, why not allow other algorithms such as SHA-512?

sha1 hashes

I've not got round to working out how to use git to handle pulls so here is a diff to add SHA1 hashes and scanning of Bing and Yahoo as well:

diff --git a/bozocrack.rb b/bozocrack.rb
old mode 100644
new mode 100755
index 5a4bd6f..fe06b92
--- a/bozocrack.rb
+++ b/bozocrack.rb
@@ -1,16 +1,38 @@
+#!/usr/bin/env ruby
+
require 'digest/md5'
+require 'digest/sha1'
require 'net/http'

class BozoCrack

  •   attr :hash_type
    
  • def initialize(filename)
  • def initialize(filename, hash_type='md5')
    @Hashes = Array.new
    @cache = Hash.new
  •   @hash_type = hash_type
    
  •   case @hash_type
    
  •           when "md5"
    
  •                   puts "Looking for MD5 hashes"
    
  •           when "sha1"
    
  •                   puts "Looking for SHA1 hashes"
    
  •           else
    
  •                   puts "Unknown hash type specified - " + @hash_type
    
  •                   exit
    
  •   end
    
    File.new(filename).each_line do |line|
  •  if m = line.chomp.match(/\b([a-fA-F0-9]{32})\b/)
    
  •    @hashes << m[1]
    
  •  end
    
  •           case @hash_type
    
  •                   when "md5"
    
  •                     if m = line.chomp.match(/\b([a-fA-F0-9]{32})\b/)
    
  •                           @hashes << m[1]
    
  •                     end
    
  •                   when "sha1"
    
  •                     if m = line.chomp.match(/\b([a-fA-F0-9]{40})\b/)
    
  •                           @hashes << m[1]
    
  •                     end
    
  •           end
    
    end
    @hashes.uniq!
    puts "Loaded #{@hashes.count} unique hashes"
    @@ -40,14 +62,31 @@ class BozoCrack
    if plaintext = dictionary_attack(hash, wordlist)
    return plaintext
    end
  • response = Net::HTTP.get URI("http://search.yahoo.com/search?p=#{hash}")
  • wordlist = response.split(/\s+/)
  • if plaintext = dictionary_attack(hash, wordlist)
  •  return plaintext
    
  • end
  • response = Net::HTTP.get URI("http://www.bing.com/search?q=#{hash}")
  • wordlist = response.split(/\s+/)
  • if plaintext = dictionary_attack(hash, wordlist)
  •  return plaintext
    
  • end
    nil
    end

def dictionary_attack(hash, wordlist)
wordlist.each do |word|

  •  if Digest::MD5.hexdigest(word) == hash.downcase
    
  •    return word
    
  •  end
    
  •           case @hash_type
    
  •                   when "md5"
    
  •                     if Digest::MD5.hexdigest(word) == hash.downcase
    
  •                           return word
    
  •                     end
    
  •                   when "sha1"
    
  •                     if Digest::SHA1.hexdigest(word) == hash.downcase
    
  •                           return word
    
  •                     end
    
  •           end
    

    end
    nil
    end
    @@ -72,6 +111,8 @@ end

    if ARGV.size == 1
    BozoCrack.new(ARGV[0]).crack
    +elsif ARGV.size == 2

  • BozoCrack.new(ARGV[1], ARGV[0]).crack
    else

  • puts "Usage example: ruby bozocrack.rb file_with_md5_hashes.txt"
    -end
    \ No newline at end of file

  • puts "Usage example: ruby bozocrack.rb file_with_md5_hashes.txt"
    +end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.