[GTK] MD5 Searcher

Iniciado por Once, Enero 02, 2013, 07:28:34 PM

Tema anterior - Siguiente tema

0 Miembros y 1 Visitante están viendo este tema.

You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Código: python
#!/usr/bin/python
# -*- coding: utf-8 -*-

import pygtk
pygtk.require('2.0')
import gtk, urllib, re

WEB = ('http://md5.noisette.ch/md5.php?hash=%s', 'http://md5.hashcracking.com/search.php?md5=%s', 'http://www.md5this.com/callme.php?hash=%s', 'http://md5.gromweb.com/query/%s', 'http://xanadrel.99k.org/hashes/api.php?hash=%s', 'http://md5-db.de/%s.html')

EXP = ('.*<string><!\[CDATA\[(.*)\]\]></string>.*', '.*is(.*)', '.*<fontsize\=\"\+6\">(.*)</font></font>.*', '(.+)', '.*<plain>(.*)</plain>.*', '.*</strong><ul><li>(.*)</li></ul></td>.*')

###########################
# | Label | Caja | Boton  #
# ----------------------- #
# |      Separador      | #
# ----------------------- #
# |        Label        | #
# ----------------------- #
# |        Salir        | #
###########################

class X:
def __init__(mi):
mi.ventana = gtk.Window(gtk.WINDOW_TOPLEVEL)
mi.ventana.set_title('MD5 Searcher GUI -11Sep-')
mi.ventana.set_border_width(10)
mi.ventana.connect('destroy', mi.Cerrar)

Tabla = gtk.Table(5, 4, False)
Tabla.set_row_spacings(5)
Tabla.set_col_spacings(5)

LblMd5 = gtk.Label('Valor MD5:')
TxtMd5 = gtk.Entry(32)
TxtMd5.set_width_chars(32)
LblResultado = gtk.Label('Resultado: ')
Separador1 = gtk.HSeparator()
Separador2 = gtk.HSeparator()

CmdBuscar = gtk.Button('Buscar')
CmdBuscar.connect('clicked', mi.Buscar, TxtMd5, LblResultado)

CmdSalir = gtk.Button('Salir')
CmdSalir.connect('clicked', mi.Cerrar)

Tabla.attach(LblMd5, 0, 1, 0, 1)
Tabla.attach(TxtMd5, 1, 3, 0, 1)
Tabla.attach(CmdBuscar, 3, 4, 0, 1)
Tabla.attach(Separador1, 0, 4, 1, 2)
Tabla.attach(LblResultado, 0, 4, 2, 3)
Tabla.attach(Separador2, 0, 4, 3, 4)
Tabla.attach(CmdSalir, 3, 4, 4, 5)

LblMd5.show()
TxtMd5.show()
CmdBuscar.show()
Separador1.show()
LblResultado.show()
Separador2.show()
CmdSalir.show()
Tabla.show()

mi.ventana.add(Tabla)
mi.ventana.show()

def Cerrar(mi, objeto, datos = None):
gtk.main_quit()
return False

def Buscar(mi, objeto, Texto, Res):
Res.set_text('Resultado: ')
try:
hash = Texto.get_text()
for i in range(len(WEB)):
datos = 'Buscando en: %s' % (WEB[i].split('/')[2])
mi.Imprimir(Res, datos)
tmp = urllib.urlopen(WEB[i] % hash).read()
tmp = tmp.replace(' ', '')
tmp = tmp.replace('\n','')
resultado = re.match(EXP[i], tmp)
if resultado == None:
mi.Imprimir(Res, '\t Sin Resultados')
else:
mi.Imprimir(Res, '\t %s' % resultado.group(1))
except:
print 'Oops, un error ha ocurrido.'

def Imprimir(mi, Res, Datos):
texto = u'%s\r\n%s' % (Res.get_text(), Datos)
Res.set_text(texto)

def main():
gtk.main()

if __name__ == '__main__':
X()
main()



Saludos!







You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login

Excelente aporte bro :)
Pentest - Hacking & Security Services

Contact me: You are not allowed to view links. You are not allowed to view links. Register or Login or You are not allowed to view links. Register or Login