Skip to content

Commit

Permalink
CODEX 2.2.1 | Check ChangeLog
Browse files Browse the repository at this point in the history
  • Loading branch information
DEADSEC-SECURITY committed May 19, 2019
1 parent a62ee3f commit 685f81a
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 96 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Version 2.2.1 -----------------------------------------------------
- Fixed bug when launching codex

Version 2.2.0 -----------------------------------------------------
- Now when hashing you can drag the files to the terminal

Expand Down
178 changes: 82 additions & 96 deletions codex.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#-----------Welcome to DeAdSeC Python Codex----------#
#-------Made By DeAdSeC-------#
#---Version 2.2.0---#
#---Version 2.2.1---#

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
Expand Down Expand Up @@ -956,6 +956,26 @@ def InputEditor(HPath, WLPath, Attack):
return Bruteforce.DicMD5(HPath, WLPath)
if Attack == 'DS':
return Bruteforce.DicSHA256(HPath, WLPath)
def WrongWordListDirectoryWPA():
print('WordList path is wrong please try again!')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT_WPA()
def WrongHandShakeDirectory():
print('HandShake path is wrong please try again!')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT_WPA()
def WrongWordListDirectoryHash():
print(f"{R}WordList file path isn't correct!{W}")
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
def WrongHashDirectory():
print(f"{R}Hash file path isn't correct!{W}")
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
def HashCatFormatError():
print(f'{R}HashCat only supports .hccapx format!{W}')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()

def DicAircrack(HP, WL):
if HP == 'NONE' or WL == 'NONE':
Expand All @@ -976,13 +996,9 @@ def DicAircrack(HP, WL):
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print('WordList path is wrong please try again!')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Bruteforce.WrongWordListDirectoryWPA()
else:
print('HandShake path is wrong please try again!')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Bruteforce.WrongHandShakeDirectory()
def BruteAircrack(HP):

global NetWorkName
Expand All @@ -1008,11 +1024,9 @@ def BruteAircrack(HP):
os.system(f'sudo crunch {MinPassLength} {MaxPassLength} abcdefghijklmnopqrstuvwxyz0123456789 | aircrack-ng -e {NetWorkName} -w - {handshakePath}')
print(f'{R}Brutefoce attack finished ...{W}')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Menus.OFFLINE_DECRYPT_WPA()
else:
print('HandShake path is wrong please try again!')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return WrongHandShakeDirectory()
def DicHashcat(HP, WL):
if HP == 'NONE' or WL == 'NONE':
print(f'Please enter full path for handshake file {O}[.hccapx]{W}: ')
Expand All @@ -1033,17 +1047,11 @@ def DicHashcat(HP, WL):
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print(f'{R}HashCat only supports .hccapx format!{W}')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Brutforce.HashCatFormatError()
else:
print('WordList path is wrong please try again!')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Bruteforce.WrongWordListDirectoryWPA()
else:
print('HandShake path is wrong please try again!')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Bruteforce.WrongHandShakeDirectory()
def BruteHashcat(HP):

global NetWorkName
Expand Down Expand Up @@ -1073,84 +1081,70 @@ def BruteHashcat(HP):
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print(f'{R}HashCat only supports .hccapx format!{W}')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Brutforce.HashCatFormatError()
else:
print('HandShake path is wrong please try again!')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Bruteforce.WrongWordListDirectoryWPA()
def RuleHashcat(HP, WL):
if HP == 'NONE' or WL == 'NONE':
print(f'Please enter full path for handshake file {O}[.hccapx]{W}: ')
HPath = str(input())
print('Please enter full path for your wordlist: ')
WLPath = str(input())
Bruteforce.InputEditor(HPath, WLPath, 'DM')
print(f'Please enter full path for handshake file {O}[.hccapx]{W}: ')
HPath = str(input())
print('Please enter full path for your wordlist: ')
WLPath = str(input())
Bruteforce.InputEditor(HPath, WLPath, 'DM')
else:
print('Please enter full path for your rule file: ')
rulePath = str(input())
CheckAspasRP = rulePath[:1]
if CheckAspasRP == "'":
rulePathNo = rulePath[1:-2]
RPVerify = os.path.isfile(f'{rulePathNo}')
else:
print('Please enter full path for your rule file: ')
rulePath = str(input())
CheckAspasRP = rulePath[:1]
if CheckAspasRP == "'":
rulePathNo = rulePath[1:-2]
RPVerify = os.path.isfile(f'{rulePathNo}')
else:
RPVerify = os.path.isfile(f'{rulePath}')
HSPVerify = os.path.isfile(f'{HP}')
WLPVerify = os.path.isfile(f'{WL}')
if HSPVerify == True:
if WLPVerify == True:
if HSPFormat == '.hccapx':
if RPVerify == True:
print(f'Starting rule attack ... {O}[CTRL-C to exit]{W}')
time.sleep(2)
os.system(f'sudo hashcat -m 2500 -r {rulePath} {HP} {WL} --force')
print(f'{R}Dictionary attack finished ...{W}')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print('Rule path is wrong please try again!')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
HSPVerify = os.path.isfile(f'{HP}')
WLPVerify = os.path.isfile(f'{WL}')
if HSPVerify == True:
if WLPVerify == True:
if HSPFormat == '.hccapx':
if RPVerify == True:
print(f'Starting rule attack ... {O}[CTRL-C to exit]{W}')
time.sleep(2)
os.system(f'sudo hashcat -m 2500 -r {rulePath} {HP} {WL} --force')
print(f'{R}Dictionary attack finished ...{W}')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print(f'{R}HashCat only supports .hccapx format!{W}')
print('Rule path is wrong please try again!')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print(f"{R}WordList file path isn't correct!{W}")
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Bruteforce.HashCatFormatError()
else:
print(f"{R}Hash file path isn't correct!{W}")
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Bruteforce.WrongWordListDirectoryWPA()
else:
return Bruteforce.WrongHandShakeDirectory()
def DicMD5(HP, WL):
if HP == 'NONE' or WL == 'NONE':
print(f'Please enter full path for the MD5 hashes file: ')
HPath = str(input())
print('Please enter full path for your wordlist: ')
WLPath = str(input())
Bruteforce.InputEditor(HPath, WLPath, 'DM')
else:
HSPVerify = os.path.isfile(f'{HP}')
WLPVerify = os.path.isfile(f'{WL}')
if HSPVerify == True:
if WLPVerify == True:
print(f'Starting dictionary attack ... {O}[CTRL-C to exit]{W}')
time.sleep(2)
os.system(f'sudo hashcat -m 0 -a 0 -o Data/FoundHashes/MD5-{RR}.txt --remove {HP} {WL} --force')
print(f'{R}Dictionary attack finished ...{W}')
print(f'{R}Cracked hashes saved to {O}Data/FoundHashes{W} file{W}')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print(f"{R}WordList file path isn't correct!{W}")
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print(f"{R}Hash file path isn't correct!{W}")
print(f'Please enter full path for the MD5 hashes file: ')
HPath = str(input())
print('Please enter full path for your wordlist: ')
WLPath = str(input())
Bruteforce.InputEditor(HPath, WLPath, 'DM')
else:
HSPVerify = os.path.isfile(f'{HP}')
WLPVerify = os.path.isfile(f'{WL}')
if HSPVerify == True:
if WLPVerify == True:
print(f'Starting dictionary attack ... {O}[CTRL-C to exit]{W}')
time.sleep(2)
os.system(f'sudo hashcat -m 0 -a 0 -o Data/FoundHashes/MD5-{RR}.txt --remove {HP} {WL} --force')
print(f'{R}Dictionary attack finished ...{W}')
print(f'{R}Cracked hashes saved to {O}Data/FoundHashes{W} file{W}')
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
return Bruteforce.WrongWordListDirectoryHash()
else:
return Bruteforce.WrongHashDirectory()
def BruteMD5(HP):
if HP == 'NONE':
print(f'Please enter full path for the MD5 hashes file: ')
Expand All @@ -1168,9 +1162,7 @@ def BruteMD5(HP):
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print(f"{R}Hash file path isn't correct!{W}")
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Bruteforce.WrongHashDirectory()
def DicSHA256(HP, WL):
if HP == 'NONE' or WL == 'NONE':
print(f'Please enter full path for the SHA256 hashes file: ')
Expand All @@ -1191,13 +1183,9 @@ def DicSHA256(HP, WL):
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print(f"{R}WordList file path isn't correct!{W}")
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Bruteforce.WrongWordListDirectoryHash()
else:
print(f"{R}Hash file path isn't correct!{W}")
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return Bruteforce.WrongHashDirectory()
def BruteSHA256(HP):
if HP == 'NONE':
print(f'Please enter full path for the SHA256 hashes file: ')
Expand All @@ -1215,9 +1203,7 @@ def BruteSHA256(HP):
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
else:
print(f"{R}Hash file path isn't correct!{W}")
input(f'Press {O}ENTER{W} to continue')
return Menus.OFFLINE_DECRYPT()
return WrongHashDirectory()

#Class for namp-scanner
class NMAPScan():
Expand Down

0 comments on commit 685f81a

Please sign in to comment.