11#-----------Welcome to DeAdSeC Python Codex----------#
22#-------Made By DeAdSeC-------#
3- #---Version 2.1.7 ---#
3+ #---Version 2.1.8 ---#
44
55#!/usr/bin/env python3
66# -*- coding: utf-8 -*-
@@ -473,6 +473,9 @@ def OFFLINE_DECRYPT():
473473 print (f'{ B } ************ Decrypt Menu ************{ W } ' )
474474 print ('0) Return to main menu' )
475475 print ('1) WPA/WPA2 decrypt menu' )
476+ print (f'{ C } ----------{ W } ' )
477+ print (f'2) Dictionary attack against capture file { P } [MD5] { O } [HashCat]{ W } ' )
478+ print (f'3) Bruteforce attack against capture file { P } [MD5] { O } [HashCat]{ W } ' )
476479 print ('' )
477480 print (f'{ C } ----------{ W } ' )
478481 print (f'{ P } Contribution:{ W } If you find any bug please help me fix it or report it to me!' )
@@ -483,6 +486,10 @@ def OFFLINE_DECRYPT():
483486 return Menus .StartMenu ()
484487 if offlineOption == '1' :
485488 return Menus .OFFLINE_DECRYPT_WPA ('OFF' )
489+ if offlineOption == '2' :
490+ return Bruteforce .DicMD5 ()
491+ if offlineOption == '3' :
492+ return Bruteforce .BruteMD5 ()
486493 if offlineOption == '' :
487494 return Menus .OFFLINE_DECRYPT ()
488495 else :
@@ -874,8 +881,23 @@ def DicAircrack():
874881 handshakePath = str (input ())
875882 print ('Please enter full path for your wordlist: ' )
876883 wordlistPath = str (input ())
877- HSPVerify = os .path .isfile (f'{ handshakePath } ' )
878- WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
884+ CheckAspas = handshakePath [:1 ]
885+ CheckAspasWP = wordlistPath [:1 ]
886+ if CheckAspas == "'" :
887+ handshakePathNo = handshakePath [1 :- 2 ]
888+ HSPVerify = os .path .isfile (f'{ handshakePathNo } ' )
889+ if CheckAspasWP == "'" :
890+ wordlistPathNo = wordlistPath [1 :- 2 ]
891+ WLPVerify = os .path .isfile (f'{ wordlistPathNo } ' )
892+ else :
893+ WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
894+ else :
895+ HSPVerify = os .path .isfile (f'{ handshakePath } ' )
896+ if CheckAspasWP == "'" :
897+ wordlistPathNo = wordlistPath [1 :- 2 ]
898+ WLPVerify = os .path .isfile (f'{ wordlistPathNo } ' )
899+ else :
900+ WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
879901 print (f'{ O } Checking paths ...{ W } ' )
880902 time .sleep (1 )
881903 if HSPVerify == True :
@@ -903,7 +925,12 @@ def BruteAircrack():
903925 MaxPassLength = str (input ())
904926 print (f'Please enter the network name { O } [If the network name has spaces write it like this "Example\ Password "]{ W } :' )
905927 NetWorkName = str (input ())
906- HSPVerify = os .path .isfile (f'{ handshakePath } ' )
928+ CheckAspas = handshakePath [:1 ]
929+ if CheckAspas == "'" :
930+ handshakePathNo = handshakePath [1 :- 2 ]
931+ HSPVerify = os .path .isfile (f'{ handshakePathNo } ' )
932+ else :
933+ HSPVerify = os .path .isfile (f'{ handshakePath } ' )
907934 print (f'{ O } Checking paths ...{ W } ' )
908935 time .sleep (1 )
909936 if HSPVerify == True :
@@ -925,6 +952,23 @@ def DicHashcat():
925952 wordlistPath = str (input ())
926953 HSPVerify = os .path .isfile (f'{ handshakePath } ' )
927954 WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
955+ CheckAspas = handshakePath [:1 ]
956+ CheckAspasWP = wordlistPath [:1 ]
957+ if CheckAspas == "'" :
958+ handshakePathNo = handshakePath [1 :- 2 ]
959+ HSPVerify = os .path .isfile (f'{ handshakePathNo } ' )
960+ if CheckAspasWP == "'" :
961+ wordlistPathNo = wordlistPath [1 :- 2 ]
962+ WLPVerify = os .path .isfile (f'{ wordlistPathNo } ' )
963+ else :
964+ WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
965+ else :
966+ HSPVerify = os .path .isfile (f'{ handshakePath } ' )
967+ if CheckAspasWP == "'" :
968+ wordlistPathNo = wordlistPath [1 :- 2 ]
969+ WLPVerify = os .path .isfile (f'{ wordlistPathNo } ' )
970+ else :
971+ WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
928972 print (f'{ O } Checking paths ...{ W } ' )
929973 time .sleep (1 )
930974 if HSPVerify == True :
@@ -958,7 +1002,12 @@ def BruteHashcat():
9581002 MinPassLength = str (input ())
9591003 print ('Please enter max password length: ' )
9601004 MaxPassLength = str (input ())
961- HSPVerify = os .path .isfile (f'{ handshakePath } ' )
1005+ CheckAspas = handshakePath [:1 ]
1006+ if CheckAspas == "'" :
1007+ handshakePathNo = handshakePath [1 :- 2 ]
1008+ HSPVerify = os .path .isfile (f'{ handshakePathNo } ' )
1009+ else :
1010+ HSPVerify = os .path .isfile (f'{ handshakePath } ' )
9621011 print (f'{ O } Checking paths ...{ W } ' )
9631012 time .sleep (1 )
9641013 if HSPVerify == True :
@@ -991,6 +1040,29 @@ def RuleHashcat():
9911040 HSPVerify = os .path .isfile (f'{ handshakePath } ' )
9921041 WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
9931042 RPVerify = os .path .isfile (f'{ rulePath } ' )
1043+ CheckAspas = handshakePath [:1 ]
1044+ CheckAspasWP = wordlistPath [:1 ]
1045+ CheckAspasRP rulePath [:1 ]
1046+ if CheckAspas == "'" :
1047+ handshakePathNo = handshakePath [1 :- 2 ]
1048+ HSPVerify = os .path .isfile (f'{ handshakePathNo } ' )
1049+ if CheckAspasWP == "'" :
1050+ wordlistPathNo = wordlistPath [1 :- 2 ]
1051+ WLPVerify = os .path .isfile (f'{ wordlistPathNo } ' )
1052+ if CheckAspasRP == "'" :
1053+ rulePathNo = rulePath [1 :- 2 ]
1054+ RPVerify = os .path .isfile (f'{ rulePathNo } ' )
1055+ else :
1056+ RPVerify = os .path .isfile (f'{ rulePath } ' )
1057+ else :
1058+ WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
1059+ else :
1060+ HSPVerify = os .path .isfile (f'{ handshakePath } ' )
1061+ if CheckAspasWP == "'" :
1062+ wordlistPathNo = wordlistPath [1 :- 2 ]
1063+ WLPVerify = os .path .isfile (f'{ wordlistPathNo } ' )
1064+ else :
1065+ WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
9941066 print (f'{ O } Checking paths ...{ W } ' )
9951067 time .sleep (1 )
9961068 if HSPVerify == True :
@@ -1022,6 +1094,68 @@ def RuleHashcat():
10221094 print (f'{ R } HandShake path is wrong please try again!{ W } ' )
10231095 input (f'Press { O } ENTER{ W } to continue' )
10241096 return Menus .OFFLINE_DECRYPT ()
1097+ def DicMD5 ():
1098+ print (f'Please enter full path for the MD5 hashes file: ' )
1099+ MD5Path = str (input ())
1100+ print ('Please enter full path for your wordlist: ' )
1101+ wordlistPath = str (input ())
1102+ CheckAspas = MD5Path [:1 ]
1103+ CheckAspasWP = wordlistPath [:1 ]
1104+ if CheckAspas == "'" :
1105+ MD5PathNo = MD5Path [1 :- 2 ]
1106+ MDPVerify = os .path .isfile (f'{ MD5PathNo } ' )
1107+ if CheckAspasWP == "'" :
1108+ wordlistPathNo = wordlistPath [1 :- 2 ]
1109+ WLPVerify = os .path .isfile (f'{ wordlistPathNo } ' )
1110+ else :
1111+ WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
1112+ else :
1113+ MDPVerify = os .path .isfile (f'{ MD5Path } ' )
1114+ if CheckAspasWP == "'" :
1115+ wordlistPathNo = wordlistPath [1 :- 2 ]
1116+ WLPVerify = os .path .isfile (f'{ wordlistPathNo } ' )
1117+ else :
1118+ WLPVerify = os .path .isfile (f'{ wordlistPath } ' )
1119+ print (f'{ O } Checking paths ...{ W } ' )
1120+ time .sleep (1 )
1121+ if MDPVerify == True :
1122+ if WLPVerify == True :
1123+ print (f'Starting dictionary attack ... { O } [CTRL-C to exit]{ W } ' )
1124+ time .sleep (2 )
1125+ os .system (f'sudo hashcat –a 0 { MD5Path } { wordlistPath } --force' )
1126+ print (f'{ R } Dictionary attack finished ...{ W } ' )
1127+ input (f'Press { O } ENTER{ W } to continue' )
1128+ return Menus .OFFLINE_DECRYPT ()
1129+ else :
1130+ print (f"{ R } WordList path isn't correct!{ W } " )
1131+ input (f'Press { O } ENTER{ W } to continue' )
1132+ return Menus .OFFLINE_DECRYPT ()
1133+ else :
1134+ print (f"{ R } Hash file path isn't correct!{ W } " )
1135+ input (f'Press { O } ENTER{ W } to continue' )
1136+ return Menus .OFFLINE_DECRYPT ()
1137+ def BruteMD5 ():
1138+ print (f'Please enter full path for the MD5 hashes file: ' )
1139+ MD5Path = str (input ())
1140+ CheckAspas = MD5Path [:1 ]
1141+ if CheckAspas == "'" :
1142+ MD5PathNo = MD5Path [1 :- 2 ]
1143+ MDPVerify = os .path .isfile (f'{ MD5PathNo } ' )
1144+ else :
1145+ MDPVerify = os .path .isfile (f'{ MD5Path } ' )
1146+ print (f'{ O } Checking paths ...{ W } ' )
1147+ time .sleep (1 )
1148+ if MDPVerify == True :
1149+ print (f'Starting bruteforce attack ... { O } [CTRL-C to exit]{ W } ' )
1150+ time .sleep (2 )
1151+ os .system (f'sudo hashcat -a 3 { MD5Path } --force' )
1152+ print (f'{ R } Bruteforce attack finished ...{ W } ' )
1153+ input (f'Press { O } ENTER{ W } to continue' )
1154+ return Menus .OFFLINE_DECRYPT ()
1155+ else :
1156+ print (f"{ R } Hash file path isn't correct!{ W } " )
1157+ input (f'Press { O } ENTER{ W } to continue' )
1158+ return Menus .OFFLINE_DECRYPT ()
10251159
10261160#Class for namp-scanner
10271161class NMAPScan ():
0 commit comments