Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows and Python 3.9 compatibility #40

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions PACK/statsgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ def analyze_password(self, password):
advancedmask_string += "?d"
if not simplemask or not simplemask[-1] == 'digit': simplemask.append('digit')

elif letter in string.lowercase:
elif letter in string.ascii_lowercase:
lower += 1
advancedmask_string += "?l"
if not simplemask or not simplemask[-1] == 'string': simplemask.append('string')


elif letter in string.uppercase:
elif letter in string.ascii_uppercase:
upper += 1
advancedmask_string += "?u"
if not simplemask or not simplemask[-1] == 'string': simplemask.append('string')
Expand Down Expand Up @@ -199,14 +199,14 @@ def print_stats(self):
" NOTE: Statistics below is relative to the number of analyzed passwords, not total number of passwords"
print
"\n[*] Length:"
for (length, count) in sorted(self.stats_length.iteritems(), key=operator.itemgetter(1), reverse=True):
for (length, count) in sorted(self.stats_length.items(), key=operator.itemgetter(1), reverse=True):
if self.hiderare and not count * 100 / self.filter_counter > 0: continue
print
"[+] %25d: %02d%% (%d)" % (length, count * 100 / self.filter_counter, count)

print
"\n[*] Character-set:"
for (char, count) in sorted(self.stats_charactersets.iteritems(), key=operator.itemgetter(1), reverse=True):
for (char, count) in sorted(self.stats_charactersets.items(), key=operator.itemgetter(1), reverse=True):
if self.hiderare and not count * 100 / self.filter_counter > 0: continue
print
"[+] %25s: %02d%% (%d)" % (char, count * 100 / self.filter_counter, count)
Expand All @@ -224,14 +224,14 @@ def print_stats(self):

print
"\n[*] Simple Masks:"
for (simplemask, count) in sorted(self.stats_simplemasks.iteritems(), key=operator.itemgetter(1), reverse=True):
for (simplemask, count) in sorted(self.stats_simplemasks.items(), key=operator.itemgetter(1), reverse=True):
if self.hiderare and not count * 100 / self.filter_counter > 0: continue
print
"[+] %25s: %02d%% (%d)" % (simplemask, count * 100 / self.filter_counter, count)

print
"\n[*] Advanced Masks:"
for (advancedmask, count) in sorted(self.stats_advancedmasks.iteritems(), key=operator.itemgetter(1),
for (advancedmask, count) in sorted(self.stats_advancedmasks.items(), key=operator.itemgetter(1),
reverse=True):
if count * 100 / self.filter_counter > 0:
print
Expand Down
14 changes: 13 additions & 1 deletion config.json.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{
"Comments": [
"For Windows only:",
"Copy the hashcat files and folders into the hate_crack folder.",
"Download and extract some needed GNU tools for Windows into the hate_crack folder:",
"CoreUtils for Windows (http://gnuwin32.sourceforge.net/packages/coreutils.htm): cat.exe, cut.exe and sort.exe needed",
"LibIntl for Windows (http://gnuwin32.sourceforge.net/packages/libintl.htm): libintl3.dll needed",
"LibIconv for Windows (http://gnuwin32.sourceforge.net/packages/libiconv.htm): libiconv2.dll needed",
"Avoid spaces in paths and filenames!",
"Folder path format: C:\\<FolderName>\\<SubfolderName>",
"Value of hcatBin: hashcat.exe",
"Value of pipalPath: C:\\<FolderName>\\pipal.rb"
],
"hcatPath": "/Passwords/hashcat",
"hcatBin": "hashcat",
"hcatTuning": "--force --remove",
Expand All @@ -9,7 +21,7 @@
"hcatHybridlist": ["rockyou.txt"],
"hcatMiddleCombinatorMasks": ["2","4"," ","-","_","+",",",".","&"],
"hcatMiddleBaseList": "rockyou.txt",
"hcatThoroughCombinatorMasks": ["0","1","2","3","4","5","6","7","8","9"," ","-","_","+",",","!","#","$","\"","%","&","'","(",")","*",",",".","/",":",";","<","=",">","?","@","[","\\","]","^","`","{","|","}","~"],
"hcatThoroughCombinatorMasks": ["0","1","2","3","4","5","6","7","8","9"," ","-","_","+",",","!","#","$","\"","%","&","'","(",")","*",".","/",":",";","<","=",">","?","@","[","\\","]","^","`","{","|","}","~"],
"hcatThoroughBaseList": "rockyou.txt",
"hcatGoodMeasureBaseList": "rockyou.txt",
"hcatRules": ["best64.rule","d3ad0ne.rule", "T0XlC.rule", "dive.rule"],
Expand Down
Loading