###########################

# [py] Joomla HASH CRACKER

###########################

#!/usr/bin/python
# -*- coding: utf-8 -*-
#+------------------------------------------------------+
#~Joomla HASH CRACKER
#~By YASSINOX.TN
#~Hacking Is illegal !
#~We love Pentesting
#~Arabian Muslims Pentesters
#+------------------------------------------------------+
import hashlib
import Tkinter
from Tkinter import *
import sys
import itertools
import time
#+------------------------------------------------------+
class bcolors:
    HEADER = '\033[95m'
    OKBLUE = '\033[94m'
    OKGREEN = '\033[92m'
    WARNING = '\033[93m'
    FAIL = '\033[91m'
    ENDC = '\033[0m'
#+------------------------------------------------------+
passlist = "pass.txt" #~Here Type Your Password List Name !
try:
    plist = open(passlist).readlines()
    print bcolors.OKGREEN + "| Success Loaded All Files !"
    print bcolors.OKGREEN + "| Starting Script Without Any Error"
except:
    print bcolors.FAIL + "| We cant find 1 required list !"
    print bcolors.FAIL + "| Starting Script With One Error"
#+------------------------------------------------------+
def crackhashw():
    input1 = txt1.get("1.0",END)
    a,b = input1.split(':')
    input2 = b
    input3 = txt2.get("1.0",END)
    if txt2['state'] == 'disabled' :
        for password in plist :
            password = password.rstrip()    
            hashedpass = hashlib.md5(password + salt).hexdigest()
            curpassword = hashedpass + ':' + input2  
            if curpassword == input1 :
                txt3.insert('1.0','\n| Password Found : ' + password)
    else:
                        try:
                                            print "| Please Click CTRL + C TO See Result !"
                                            choices = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789 "
                
                                            for length in range(6,20):
                                                for entry in itertools.product(choices,repeat = length):
                                                    password = ''.join(entry)
                                                                    hashedpass = hashlib.md5(password + salt).hexdigest()
                                                                    curpassword = hashedpass + ':' + input2  
                                                                    if curpassword == input1 :
                                                                        txt3.insert('1.0','\n| Password Found : ' + password)
            
                        except KeyboardInterrupt:
                             print "\n| Stopped Attack "
  
                    
def enablechar():
    txt2['state'] = 'normal'
def disablechar():
    txt2['state'] = 'disabled'
#+------------------------------------------------------+
hash = raw_input("| Hash >")
hashmd5,salt  = hash.split(':')
top = Tkinter.Tk()
top.title("JOOMLA HASH CRACKER")
top.geometry(("%dx%d")%(700,300))
lbl1 = Label (top, text="Joomla Hash Cracker", fg = "red", height = "2", font=('Serif',24))
lbl1.pack()
lbl2 = Label (top, text="Hash :", fg = "blue", height = "4", font=('Serif',12)).place(x = 1, y = 49)
txt1 = Text (top, bg = "black", width = "79" ,height = "1",fg = "green")
txt1.insert('1.0',hash)
txt1.pack()
lbl3 = Label (top, text="Chars :", fg = "blue", height = "4", font=('Serif',12)).place(x = 1, y = 95)
txt2 = Text (top, bg = "black", width = "79" ,height = "1",fg = "green",state = DISABLED)
txt2.place(x = 69, y = 125)
btn1 = Button (top,bg = "black",fg = "green", text =  "             Crack              " ,command= crackhashw)
btn1.place(x = 264, y = 162)
txt3 = Text (top, bg = "black", width = "79" ,height = "6",fg = "green" )
txt3.place(x = 69, y = 205)
chk1 = Radiobutton(top, text = "Using Wordlist",fg = "blue", command = disablechar)
chk1.place(x = 69, y = 102)
chk2 = Radiobutton(top, text = "Using Random Chars",fg = "blue", value=1, command = enablechar)
chk2.place(x = 190, y = 102)
top.mainloop()
#+------------------------------------------------------+

###########################

# Iranian Exploit DataBase = http://IeDb.Ir [2016-12-17]

###########################