juuso / bozocrack Goto Github PK
View Code? Open in Web Editor NEWA silly & effective MD5 cracker in Ruby
A silly & effective MD5 cracker in Ruby
$SHA$fa53f0abea41ae0b$02e9019c5eae9e9bdc73300a920b8610d63d7c1439336a9669b09193b0f87f38
A simple and effective MD5 cracker needs a simple and effective web interface. (In PHP of course!)
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?
probably needs to try every sequence of words
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
@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
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
return plaintext
return plaintext
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.