Skip to content

Instantly share code, notes, and snippets.

@gdisneyleugers
Created March 30, 2014 00:22
Show Gist options
  • Save gdisneyleugers/9865290 to your computer and use it in GitHub Desktop.
Save gdisneyleugers/9865290 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'digest/md5'
puts "Warning this tool only works with DER encoded certificates"
puts "Please save CA to spoof root.cer"
$i = {}
for $i in 1..99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
system("ruby castealer.rb")
puts "==== Running Collision ===="
printf "Root: "
a = puts Digest::MD5.hexdigest(File.read('root.cer'))
printf "Spoof: "
b = puts Digest::MD5.hexdigest(File.read('spoof.cer'))
if a = b
puts "Collision Complete"
sleep 5
system('exit')
end
end
puts "Collision Failed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment