elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Tutorial básico de Quickjs


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  [Ruby] CrackHash 0.1
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [Ruby] CrackHash 0.1  (Leído 1,313 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[Ruby] CrackHash 0.1
« en: 10 Febrero 2012, 21:04 pm »

Un simple codigo en ruby para crackear un hash md5 con un diccionario.

Código
  1. #!usr/bin/ruby
  2. #CrackHash 0.1
  3. #Coded By Doddy H
  4. #Test with 202cb962ac59075b964b07152d234b70 = 123
  5.  
  6. require "digest/md5"
  7.  
  8. def openwords(file)
  9.  if File.file?(file)
  10.    print "\n[+] Opening file\n\n"
  11.    ar = File.open(file)
  12.    lineas = ar.readlines
  13.    ar.close
  14.    print "[+] Number of words : ",lineas.length,"\n\n"
  15.    return lineas
  16.  else
  17.    print "[-] Error opening file\n"
  18.  end
  19. end
  20.  
  21. def sintax()
  22.  print "\n[+] ruby crack.rb <hash> <wordlist>\n"
  23. end
  24.  
  25. def head()
  26.  print "\n-- == CrackHash 0.1 == --\n\n"
  27. end
  28.  
  29. def copyright()
  30.  print "\n\n(C) Doddy Hackman 2012\n"
  31.  exit(1)
  32. end
  33.  
  34. hash = ARGV[0]
  35. wordlist = ARGV[1]
  36.  
  37. head()
  38.  
  39. if !hash and !wordlist
  40.  sintax()
  41. else
  42.  if hash.length ==32
  43.    words = openwords(wordlist)
  44.    print "\n[+] Cracking hash...\n\n"
  45.    words.each do |word|
  46.      word = word.chomp
  47.      if Digest::MD5.hexdigest(word) == hash
  48.        print "\a\a\n[+] Hash cracked : ",word,"\n"
  49.        copyright()
  50.      end      
  51.    end
  52.    print "\n[-] Hash not found\n\n"
  53.  else
  54.    print "\n[-] Hash invalid\n\n"
  55.    copyright()      
  56.  end
  57. end
  58.  
  59. copyright()
  60.  
  61.  
  62. # The End ?
  63.  


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
ruby vs perl ??
Scripting
vacio 3 4,221 Último mensaje 26 Julio 2006, 17:32 pm
por vacio
Ruby
Programación General
¡Micronet! 2 3,110 Último mensaje 18 Octubre 2010, 22:49 pm
por ¡Micronet!
[Introducing Ruby] Lo que debes saber sobre Ruby
Scripting
RyogiShiki 0 9,621 Último mensaje 4 Marzo 2011, 20:45 pm
por RyogiShiki
[Ruby] IRC Bot
Scripting
BigBear 0 2,284 Último mensaje 7 Octubre 2011, 01:30 am
por BigBear
[Java] CrackHash 0.1
Java
BigBear 0 1,100 Último mensaje 13 Enero 2013, 03:38 am
por BigBear
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines