11#-----------Welcome to DeAdSeC Python Codex----------#
22#-------Made By DeAdSeC-------#
3- #---Version 2.1.8 ---#
3+ #---Version 2.1.9 ---#
44
55#!/usr/bin/env python3
66# -*- coding: utf-8 -*-
1515import pandas
1616import nmap
1717import netifaces
18+ import random
1819#IMPORT UTILS
1920from utils .colors import *
2021from utils .ExtraVariables import *
2728Directory = 'Data/Aircrack-ng/' #You can edit this variable
2829#NMAP
2930nm = nmap .PortScanner ()
31+ #RANDOM
32+ RR = random .randint (0 , 100000 )
3033
3134#OS to clean the screen
3235def OS ():
@@ -476,6 +479,9 @@ def OFFLINE_DECRYPT():
476479 print (f'{ C } ----------{ W } ' )
477480 print (f'2) Dictionary attack against capture file { P } [MD5] { O } [HashCat]{ W } ' )
478481 print (f'3) Bruteforce attack against capture file { P } [MD5] { O } [HashCat]{ W } ' )
482+ print (f'{ C } ----------{ W } ' )
483+ print (f'4) Dictionary attack against capture file { P } [SHA256] { O } [HashCat]{ W } ' )
484+ print (f'5) Bruteforce attack against capture file { P } [SHA256] { O } [HashCat]{ W } ' )
479485 print ('' )
480486 print (f'{ C } ----------{ W } ' )
481487 print (f'{ P } Contribution:{ W } If you find any bug please help me fix it or report it to me!' )
@@ -490,6 +496,10 @@ def OFFLINE_DECRYPT():
490496 return Bruteforce .DicMD5 ()
491497 if offlineOption == '3' :
492498 return Bruteforce .BruteMD5 ()
499+ if offlineOption == '4' :
500+ return Bruteforce .DicSHA256 ()
501+ if offlineOption == '5' :
502+ return Bruteforce .BruteSHA256 ()
493503 if offlineOption == '' :
494504 return Menus .OFFLINE_DECRYPT ()
495505 else :
@@ -1122,8 +1132,9 @@ def DicMD5():
11221132 if WLPVerify == True :
11231133 print (f'Starting dictionary attack ... { O } [CTRL-C to exit]{ W } ' )
11241134 time .sleep (2 )
1125- os .system (f'sudo hashcat – a 0 { MD5Path } { wordlistPath } --force' )
1135+ os .system (f'sudo hashcat -m 0 - a 0 -o Data/FoundHashes/MD5- { RR } .txt --remove { MD5Path } { wordlistPath } --force' )
11261136 print (f'{ R } Dictionary attack finished ...{ W } ' )
1137+ print (f'{ R } Cracked hashes saved to { O } Data/FoundHashes{ W } file{ W } ' )
11271138 input (f'Press { O } ENTER{ W } to continue' )
11281139 return Menus .OFFLINE_DECRYPT ()
11291140 else :
@@ -1149,7 +1160,73 @@ def BruteMD5():
11491160 print (f'Starting bruteforce attack ... { O } [CTRL-C to exit]{ W } ' )
11501161 time .sleep (2 )
11511162 os .system (f'sudo hashcat -a 3 { MD5Path } --force' )
1163+ os .system (f'sudo hashcat -m 0 -a 3 -o Data/FoundHashes/MD5-{ RR } .txt --remove { MD5Path } { wordlistPath } --force' )
11521164 print (f'{ R } Bruteforce attack finished ...{ W } ' )
1165+ print (f'{ R } Cracked hashes saved to { O } Data/FoundHashes{ W } file{ W } ' )
1166+ input (f'Press { O } ENTER{ W } to continue' )
1167+ return Menus .OFFLINE_DECRYPT ()
1168+ else :
1169+ print (f"{ R } Hash file path isn't correct!{ W } " )
1170+ input (f'Press { O } ENTER{ W } to continue' )
1171+ return Menus .OFFLINE_DECRYPT ()
1172+ def DicSHA256 ():
1173+ print (f'Please enter full path for the SHA256 hashes file: ' )
1174+ SHA256Path = str (input ())
1175+ print ('Please enter full path for your wordlist: ' )
1176+ wordlistPath = str (input ())
1177+ CheckAspas = SHA256Path [:1 ]
1178+ CheckAspasWP = wordlistPath [:1 ]
1179+ if CheckAspas == "'" :
1180+ SHA256PathNo = SHA256Path [1 :- 2 ]
1181+ MDPVerify = os .path .isfile (f'{ SHA256PathNo } ' )
1182+ if CheckAspasWP == "'" :
1183+ wordlistPathNo = wordlistPath [1 :- 2 ]
1184+ WLPVerify = os .path .isfile (f'{ wordlistPathNo } ' )
1185+ else :
1186+ WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
1187+ else :
1188+ MDPVerify = os .path .isfile (f'{ SHA256Path } ' )
1189+ if CheckAspasWP == "'" :
1190+ wordlistPathNo = wordlistPath [1 :- 2 ]
1191+ WLPVerify = os .path .isfile (f'{ wordlistPathNo } ' )
1192+ else :
1193+ WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
1194+ print (f'{ O } Checking paths ...{ W } ' )
1195+ time .sleep (1 )
1196+ if MDPVerify == True :
1197+ if WLPVerify == True :
1198+ print (f'Starting dictionary attack ... { O } [CTRL-C to exit]{ W } ' )
1199+ time .sleep (2 )
1200+ os .system (f'sudo hashcat -m 1800 -a 0 -o Data/FoundHashes/SHA256-{ RR } .txt --remove { SHA256Path } { wordlistPath } --force' )
1201+ print (f'{ R } Dictionary attack finished ...{ W } ' )
1202+ print (f'{ R } Cracked hashes saved to { O } Data/FoundHashes{ W } file{ W } ' )
1203+ input (f'Press { O } ENTER{ W } to continue' )
1204+ return Menus .OFFLINE_DECRYPT ()
1205+ else :
1206+ print (f"{ R } WordList path isn't correct!{ W } " )
1207+ input (f'Press { O } ENTER{ W } to continue' )
1208+ return Menus .OFFLINE_DECRYPT ()
1209+ else :
1210+ print (f"{ R } Hash file path isn't correct!{ W } " )
1211+ input (f'Press { O } ENTER{ W } to continue' )
1212+ return Menus .OFFLINE_DECRYPT ()
1213+ def DicSHA256 ():
1214+ print (f'Please enter full path for the SHA256 hashes file: ' )
1215+ SHA256Path = str (input ())
1216+ CheckAspas = SHA256Path [:1 ]
1217+ if CheckAspas == "'" :
1218+ SHA256PathNo = SHA256Path [1 :- 2 ]
1219+ MDPVerify = os .path .isfile (f'{ SHA256PathNo } ' )
1220+ else :
1221+ MDPVerify = os .path .isfile (f'{ SHA256Path } ' )
1222+ print (f'{ O } Checking paths ...{ W } ' )
1223+ time .sleep (1 )
1224+ if MDPVerify == True :
1225+ print (f'Starting bruteforce attack ... { O } [CTRL-C to exit]{ W } ' )
1226+ time .sleep (2 )
1227+ os .system (f'sudo hashcat -m 1800 -a 3 -o Data/FoundHashes/SHA256-{ RR } .txt --remove { SHA256Path } --force' )
1228+ print (f'{ R } Dictionary attack finished ...{ W } ' )
1229+ print (f'{ R } Cracked hashes saved to { O } Data/FoundHashes{ W } file{ W } ' )
11531230 input (f'Press { O } ENTER{ W } to continue' )
11541231 return Menus .OFFLINE_DECRYPT ()
11551232 else :
0 commit comments