#protos.nu@gmail.com min=('a'..'z').to_a may=('A'..'Z').to_a num=('1'..'9').to_a tot=min+may+num bien= "R" time = Time.now tot.each {|a| if a==bien time2 = Time.now print "Password: ", a, "\nen #{time2-time}segs" break else tot.each {|b| if a+b==bien time2 = Time.now print "Password: ", a+b, "\nen #{time2-time}segs" break else tot.each {|c| if a+b+c==bien time2 = Time.now print "Password: ", a+b+c, "\nen #{time2-time}segs" break else tot.each{|d| if a+b+c+d==bien time2 = Time.now print "Password: ", a+b+c+d, "\nen #{time2-time}segs" break else fail=1 end } end } end } end } #PRUEBAS #XoR1 => 36.62 seg #9999 => 45.82 seg #iR4 => 6.17 seg #94 => 43 seg #R => 31 seg #Conclusiones: excelente si se sabe la longitud de la cadena a romper, sino mejor la otra version