diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9e613c0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "hashcat-utils"] + path = hashcat-utils + url = https://github.com/hashcat/hashcat-utils.git diff --git a/hashcat-utils b/hashcat-utils new file mode 160000 index 0000000..8bbf2ba --- /dev/null +++ b/hashcat-utils @@ -0,0 +1 @@ +Subproject commit 8bbf2baf7b341c8ec23ca91e44e0ac7d7fcc0355 diff --git a/hashcat-utils/CHANGES b/hashcat-utils/CHANGES deleted file mode 100644 index 104eeb7..0000000 --- a/hashcat-utils/CHANGES +++ /dev/null @@ -1,9 +0,0 @@ -* v1.1 -> v1.2 - -- Open Source the project -- License is MIT -- Moved repository to github: https://github.com/hashcat/hashcat-utils -- Added CHANGES -- Added LICENSE -- Added README.md - diff --git a/hashcat-utils/LICENSE b/hashcat-utils/LICENSE deleted file mode 100644 index ea53078..0000000 --- a/hashcat-utils/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Jens Steube - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/hashcat-utils/README.md b/hashcat-utils/README.md deleted file mode 100644 index 554aaa5..0000000 --- a/hashcat-utils/README.md +++ /dev/null @@ -1,28 +0,0 @@ -hashcat-utils -============== - -Hashcat-utils are a set of small utilities that are useful in advanced password cracking - -Brief description --------------- - -They all are packed into multiple stand-alone binaries. - -All of these utils are designed to execute only one specific function. - -Since they all work with STDIN and STDOUT you can group them into chains. - -Detailed description --------------- - -tbd - -Compile --------------- - -Simply run make - -Binary distribution --------------- - -Binaries for Linux, Windows and OSX: https://github.com/hashcat/hashcat-utils/releases diff --git a/hashcat-utils/bin/cleanup-rules.app b/hashcat-utils/bin/cleanup-rules.app deleted file mode 100755 index 52c50fd..0000000 Binary files a/hashcat-utils/bin/cleanup-rules.app and /dev/null differ diff --git a/hashcat-utils/bin/cleanup-rules.bin b/hashcat-utils/bin/cleanup-rules.bin deleted file mode 100755 index d6e34d5..0000000 Binary files a/hashcat-utils/bin/cleanup-rules.bin and /dev/null differ diff --git a/hashcat-utils/bin/cleanup-rules.exe b/hashcat-utils/bin/cleanup-rules.exe deleted file mode 100755 index 584947a..0000000 Binary files a/hashcat-utils/bin/cleanup-rules.exe and /dev/null differ diff --git a/hashcat-utils/bin/combinator.app b/hashcat-utils/bin/combinator.app deleted file mode 100755 index 3612d9f..0000000 Binary files a/hashcat-utils/bin/combinator.app and /dev/null differ diff --git a/hashcat-utils/bin/combinator.bin b/hashcat-utils/bin/combinator.bin deleted file mode 100755 index e0bfe36..0000000 Binary files a/hashcat-utils/bin/combinator.bin and /dev/null differ diff --git a/hashcat-utils/bin/combinator.exe b/hashcat-utils/bin/combinator.exe deleted file mode 100755 index 8282b18..0000000 Binary files a/hashcat-utils/bin/combinator.exe and /dev/null differ diff --git a/hashcat-utils/bin/combinator3.app b/hashcat-utils/bin/combinator3.app deleted file mode 100755 index 22e58bf..0000000 Binary files a/hashcat-utils/bin/combinator3.app and /dev/null differ diff --git a/hashcat-utils/bin/combinator3.bin b/hashcat-utils/bin/combinator3.bin deleted file mode 100755 index bd91494..0000000 Binary files a/hashcat-utils/bin/combinator3.bin and /dev/null differ diff --git a/hashcat-utils/bin/combinator3.exe b/hashcat-utils/bin/combinator3.exe deleted file mode 100755 index a3412d1..0000000 Binary files a/hashcat-utils/bin/combinator3.exe and /dev/null differ diff --git a/hashcat-utils/bin/combipow.app b/hashcat-utils/bin/combipow.app deleted file mode 100755 index e5459e2..0000000 Binary files a/hashcat-utils/bin/combipow.app and /dev/null differ diff --git a/hashcat-utils/bin/combipow.bin b/hashcat-utils/bin/combipow.bin deleted file mode 100755 index 499814a..0000000 Binary files a/hashcat-utils/bin/combipow.bin and /dev/null differ diff --git a/hashcat-utils/bin/combipow.exe b/hashcat-utils/bin/combipow.exe deleted file mode 100755 index 237e14d..0000000 Binary files a/hashcat-utils/bin/combipow.exe and /dev/null differ diff --git a/hashcat-utils/bin/cutb.app b/hashcat-utils/bin/cutb.app deleted file mode 100755 index fea8977..0000000 Binary files a/hashcat-utils/bin/cutb.app and /dev/null differ diff --git a/hashcat-utils/bin/cutb.bin b/hashcat-utils/bin/cutb.bin deleted file mode 100755 index c4aeaef..0000000 Binary files a/hashcat-utils/bin/cutb.bin and /dev/null differ diff --git a/hashcat-utils/bin/cutb.exe b/hashcat-utils/bin/cutb.exe deleted file mode 100755 index d4a21ae..0000000 Binary files a/hashcat-utils/bin/cutb.exe and /dev/null differ diff --git a/hashcat-utils/bin/expander.app b/hashcat-utils/bin/expander.app deleted file mode 100755 index 23025d4..0000000 Binary files a/hashcat-utils/bin/expander.app and /dev/null differ diff --git a/hashcat-utils/bin/expander.bin b/hashcat-utils/bin/expander.bin deleted file mode 100755 index ffb55c8..0000000 Binary files a/hashcat-utils/bin/expander.bin and /dev/null differ diff --git a/hashcat-utils/bin/expander.exe b/hashcat-utils/bin/expander.exe deleted file mode 100755 index 69966b9..0000000 Binary files a/hashcat-utils/bin/expander.exe and /dev/null differ diff --git a/hashcat-utils/bin/gate.app b/hashcat-utils/bin/gate.app deleted file mode 100755 index 930020c..0000000 Binary files a/hashcat-utils/bin/gate.app and /dev/null differ diff --git a/hashcat-utils/bin/gate.bin b/hashcat-utils/bin/gate.bin deleted file mode 100755 index 5cbf5bf..0000000 Binary files a/hashcat-utils/bin/gate.bin and /dev/null differ diff --git a/hashcat-utils/bin/gate.exe b/hashcat-utils/bin/gate.exe deleted file mode 100755 index 43b8a2e..0000000 Binary files a/hashcat-utils/bin/gate.exe and /dev/null differ diff --git a/hashcat-utils/bin/generate-rules.app b/hashcat-utils/bin/generate-rules.app deleted file mode 100755 index 4f929e9..0000000 Binary files a/hashcat-utils/bin/generate-rules.app and /dev/null differ diff --git a/hashcat-utils/bin/generate-rules.bin b/hashcat-utils/bin/generate-rules.bin deleted file mode 100755 index 0dd33e1..0000000 Binary files a/hashcat-utils/bin/generate-rules.bin and /dev/null differ diff --git a/hashcat-utils/bin/generate-rules.exe b/hashcat-utils/bin/generate-rules.exe deleted file mode 100755 index cb4035b..0000000 Binary files a/hashcat-utils/bin/generate-rules.exe and /dev/null differ diff --git a/hashcat-utils/bin/hcstatgen.app b/hashcat-utils/bin/hcstatgen.app deleted file mode 100755 index f8b9e56..0000000 Binary files a/hashcat-utils/bin/hcstatgen.app and /dev/null differ diff --git a/hashcat-utils/bin/hcstatgen.bin b/hashcat-utils/bin/hcstatgen.bin deleted file mode 100755 index 76d278b..0000000 Binary files a/hashcat-utils/bin/hcstatgen.bin and /dev/null differ diff --git a/hashcat-utils/bin/hcstatgen.exe b/hashcat-utils/bin/hcstatgen.exe deleted file mode 100755 index b5bb198..0000000 Binary files a/hashcat-utils/bin/hcstatgen.exe and /dev/null differ diff --git a/hashcat-utils/bin/keyspace.app b/hashcat-utils/bin/keyspace.app deleted file mode 100755 index 8b84174..0000000 Binary files a/hashcat-utils/bin/keyspace.app and /dev/null differ diff --git a/hashcat-utils/bin/keyspace.bin b/hashcat-utils/bin/keyspace.bin deleted file mode 100755 index 7ac6ec1..0000000 Binary files a/hashcat-utils/bin/keyspace.bin and /dev/null differ diff --git a/hashcat-utils/bin/keyspace.exe b/hashcat-utils/bin/keyspace.exe deleted file mode 100755 index ea5a0ba..0000000 Binary files a/hashcat-utils/bin/keyspace.exe and /dev/null differ diff --git a/hashcat-utils/bin/len.app b/hashcat-utils/bin/len.app deleted file mode 100755 index e794812..0000000 Binary files a/hashcat-utils/bin/len.app and /dev/null differ diff --git a/hashcat-utils/bin/len.bin b/hashcat-utils/bin/len.bin deleted file mode 100755 index 6904693..0000000 Binary files a/hashcat-utils/bin/len.bin and /dev/null differ diff --git a/hashcat-utils/bin/len.exe b/hashcat-utils/bin/len.exe deleted file mode 100755 index 774599f..0000000 Binary files a/hashcat-utils/bin/len.exe and /dev/null differ diff --git a/hashcat-utils/bin/mli2.app b/hashcat-utils/bin/mli2.app deleted file mode 100755 index 5935e8c..0000000 Binary files a/hashcat-utils/bin/mli2.app and /dev/null differ diff --git a/hashcat-utils/bin/mli2.bin b/hashcat-utils/bin/mli2.bin deleted file mode 100755 index d105fa1..0000000 Binary files a/hashcat-utils/bin/mli2.bin and /dev/null differ diff --git a/hashcat-utils/bin/mli2.exe b/hashcat-utils/bin/mli2.exe deleted file mode 100755 index ace59c5..0000000 Binary files a/hashcat-utils/bin/mli2.exe and /dev/null differ diff --git a/hashcat-utils/bin/morph.app b/hashcat-utils/bin/morph.app deleted file mode 100755 index 99bc2f5..0000000 Binary files a/hashcat-utils/bin/morph.app and /dev/null differ diff --git a/hashcat-utils/bin/morph.bin b/hashcat-utils/bin/morph.bin deleted file mode 100755 index b9e9928..0000000 Binary files a/hashcat-utils/bin/morph.bin and /dev/null differ diff --git a/hashcat-utils/bin/morph.exe b/hashcat-utils/bin/morph.exe deleted file mode 100755 index e769519..0000000 Binary files a/hashcat-utils/bin/morph.exe and /dev/null differ diff --git a/hashcat-utils/bin/permute.app b/hashcat-utils/bin/permute.app deleted file mode 100755 index 1b0d886..0000000 Binary files a/hashcat-utils/bin/permute.app and /dev/null differ diff --git a/hashcat-utils/bin/permute.bin b/hashcat-utils/bin/permute.bin deleted file mode 100755 index 5d13f51..0000000 Binary files a/hashcat-utils/bin/permute.bin and /dev/null differ diff --git a/hashcat-utils/bin/permute.exe b/hashcat-utils/bin/permute.exe deleted file mode 100755 index 89ca3c4..0000000 Binary files a/hashcat-utils/bin/permute.exe and /dev/null differ diff --git a/hashcat-utils/bin/permute_exist.app b/hashcat-utils/bin/permute_exist.app deleted file mode 100755 index 82e7739..0000000 Binary files a/hashcat-utils/bin/permute_exist.app and /dev/null differ diff --git a/hashcat-utils/bin/permute_exist.bin b/hashcat-utils/bin/permute_exist.bin deleted file mode 100755 index 86e3ab9..0000000 Binary files a/hashcat-utils/bin/permute_exist.bin and /dev/null differ diff --git a/hashcat-utils/bin/permute_exist.exe b/hashcat-utils/bin/permute_exist.exe deleted file mode 100755 index 0172ebe..0000000 Binary files a/hashcat-utils/bin/permute_exist.exe and /dev/null differ diff --git a/hashcat-utils/bin/prepare.app b/hashcat-utils/bin/prepare.app deleted file mode 100755 index 11b5a62..0000000 Binary files a/hashcat-utils/bin/prepare.app and /dev/null differ diff --git a/hashcat-utils/bin/prepare.bin b/hashcat-utils/bin/prepare.bin deleted file mode 100755 index 3aa6ec3..0000000 Binary files a/hashcat-utils/bin/prepare.bin and /dev/null differ diff --git a/hashcat-utils/bin/prepare.exe b/hashcat-utils/bin/prepare.exe deleted file mode 100755 index c4f9386..0000000 Binary files a/hashcat-utils/bin/prepare.exe and /dev/null differ diff --git a/hashcat-utils/bin/req-exclude.app b/hashcat-utils/bin/req-exclude.app deleted file mode 100755 index 921818b..0000000 Binary files a/hashcat-utils/bin/req-exclude.app and /dev/null differ diff --git a/hashcat-utils/bin/req-exclude.bin b/hashcat-utils/bin/req-exclude.bin deleted file mode 100755 index df01217..0000000 Binary files a/hashcat-utils/bin/req-exclude.bin and /dev/null differ diff --git a/hashcat-utils/bin/req-exclude.exe b/hashcat-utils/bin/req-exclude.exe deleted file mode 100755 index 4a8e9f0..0000000 Binary files a/hashcat-utils/bin/req-exclude.exe and /dev/null differ diff --git a/hashcat-utils/bin/req-include.app b/hashcat-utils/bin/req-include.app deleted file mode 100755 index 2194fe5..0000000 Binary files a/hashcat-utils/bin/req-include.app and /dev/null differ diff --git a/hashcat-utils/bin/req-include.bin b/hashcat-utils/bin/req-include.bin deleted file mode 100755 index 8ec0f3f..0000000 Binary files a/hashcat-utils/bin/req-include.bin and /dev/null differ diff --git a/hashcat-utils/bin/req-include.exe b/hashcat-utils/bin/req-include.exe deleted file mode 100755 index 08a27f1..0000000 Binary files a/hashcat-utils/bin/req-include.exe and /dev/null differ diff --git a/hashcat-utils/bin/rli.app b/hashcat-utils/bin/rli.app deleted file mode 100755 index d1e4464..0000000 Binary files a/hashcat-utils/bin/rli.app and /dev/null differ diff --git a/hashcat-utils/bin/rli.bin b/hashcat-utils/bin/rli.bin deleted file mode 100755 index f22ae11..0000000 Binary files a/hashcat-utils/bin/rli.bin and /dev/null differ diff --git a/hashcat-utils/bin/rli.exe b/hashcat-utils/bin/rli.exe deleted file mode 100755 index f7cb223..0000000 Binary files a/hashcat-utils/bin/rli.exe and /dev/null differ diff --git a/hashcat-utils/bin/rli2.app b/hashcat-utils/bin/rli2.app deleted file mode 100755 index aeeeb0f..0000000 Binary files a/hashcat-utils/bin/rli2.app and /dev/null differ diff --git a/hashcat-utils/bin/rli2.bin b/hashcat-utils/bin/rli2.bin deleted file mode 100755 index 6012682..0000000 Binary files a/hashcat-utils/bin/rli2.bin and /dev/null differ diff --git a/hashcat-utils/bin/rli2.exe b/hashcat-utils/bin/rli2.exe deleted file mode 100755 index 66420ec..0000000 Binary files a/hashcat-utils/bin/rli2.exe and /dev/null differ diff --git a/hashcat-utils/bin/seprule.pl b/hashcat-utils/bin/seprule.pl deleted file mode 100755 index 9be08c6..0000000 --- a/hashcat-utils/bin/seprule.pl +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env perl - -## Name........: seprule -## Autor.......: Jens Steube -## License.....: MIT - -use strict; -use warnings; - -## -## configuration -## - -my @rp = ('0'..'9', 'A'..'Z'); - -my $width = 3; -my $rule = "i"; -my $sep = " "; - -## -## code -## - -my $rp_size = scalar @rp; - -my $total = $rp_size ** $width; - -my $db; - -for (my $i = 0; $i < $total; $i++) -{ - my $left = $i; - - my @out; - - for (my $c = 0; $c < $width; $c++) - { - my $m = $left % $rp_size; - my $d = $left / $rp_size; - - push (@out, $m); - - $left = $d; - } - - @out = sort { $a <=> $b } @out; - - my $val = join ("", @out); - - next if (exists $db->{$val}); - - $db->{$val} = undef; - - my @final; - - for (my $c = 0; $c < $width; $c++) - { - my $s = sprintf ("T%s", $rp[$out[$c]]); - - push (@final, $s); - } - - for (my $c = 0; $c < $width; $c++) - { - my $s = sprintf ("%s%s%s", $rule, $rp[$out[$c]], $sep); - - push (@final, $s); - } - - print join (" ", "l", @final), "\n"; -} diff --git a/hashcat-utils/bin/splitlen.app b/hashcat-utils/bin/splitlen.app deleted file mode 100755 index fa1f9d9..0000000 Binary files a/hashcat-utils/bin/splitlen.app and /dev/null differ diff --git a/hashcat-utils/bin/splitlen.bin b/hashcat-utils/bin/splitlen.bin deleted file mode 100755 index 8746968..0000000 Binary files a/hashcat-utils/bin/splitlen.bin and /dev/null differ diff --git a/hashcat-utils/bin/splitlen.exe b/hashcat-utils/bin/splitlen.exe deleted file mode 100755 index 46e71f1..0000000 Binary files a/hashcat-utils/bin/splitlen.exe and /dev/null differ diff --git a/hashcat-utils/bin/strip-bsn.app b/hashcat-utils/bin/strip-bsn.app deleted file mode 100755 index 0a4e0e3..0000000 Binary files a/hashcat-utils/bin/strip-bsn.app and /dev/null differ diff --git a/hashcat-utils/bin/strip-bsn.bin b/hashcat-utils/bin/strip-bsn.bin deleted file mode 100755 index e26acd2..0000000 Binary files a/hashcat-utils/bin/strip-bsn.bin and /dev/null differ diff --git a/hashcat-utils/bin/strip-bsn.exe b/hashcat-utils/bin/strip-bsn.exe deleted file mode 100755 index 2d0cccc..0000000 Binary files a/hashcat-utils/bin/strip-bsn.exe and /dev/null differ diff --git a/hashcat-utils/bin/strip-bsr.app b/hashcat-utils/bin/strip-bsr.app deleted file mode 100755 index ff56c97..0000000 Binary files a/hashcat-utils/bin/strip-bsr.app and /dev/null differ diff --git a/hashcat-utils/bin/strip-bsr.bin b/hashcat-utils/bin/strip-bsr.bin deleted file mode 100755 index 429b617..0000000 Binary files a/hashcat-utils/bin/strip-bsr.bin and /dev/null differ diff --git a/hashcat-utils/bin/strip-bsr.exe b/hashcat-utils/bin/strip-bsr.exe deleted file mode 100755 index b92935c..0000000 Binary files a/hashcat-utils/bin/strip-bsr.exe and /dev/null differ diff --git a/hashcat-utils/bin/tmesis.pl b/hashcat-utils/bin/tmesis.pl deleted file mode 100755 index 0b9d43e..0000000 --- a/hashcat-utils/bin/tmesis.pl +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env perl - -## Name........: tmesis -## Autor.......: Jens Steube -## License.....: MIT - -use strict; -use warnings; - -#tmesis will take a wordlist and produce insertion rules that would insert each word of the wordlist to preset positions. -#For example: -#Word ‘password’ will create insertion rules that would insert ‘password’ from position 0 to position F (15) and It will mutate the string ‘123456’ as follows. -#password123456 -#1password23456 -#12password3456 -#123password456 -#1234password56 -#12345password6 -#123456password -# -#Hints: -#*Use tmesis to create rules to attack hashlists the came from the source. Run initial analysis on the cracked passwords , collect the top 10 – 20 words appear on the passwords and use tmesis to generate rules. -#*use tmesis generated rules in combination with best64.rules -# -# inspired by T0XlC - -my $min_rule_pos = 0; -my $max_rule_pos = 15; - -my $db; - -my @intpos_to_rulepos = ('0'..'9', 'A'..'Z'); - -my $function = "i"; -#my $function = "o"; - -while (my $word = <>) -{ - chomp $word; - - my $word_len = length $word; - - my @word_buf = split "", $word; - - for (my $rule_pos = $min_rule_pos; $rule_pos < $max_rule_pos - $word_len; $rule_pos++) - { - my @rule; - - for (my $word_pos = 0; $word_pos < $word_len; $word_pos++) - { - my $function_full = $function . $intpos_to_rulepos[$rule_pos + $word_pos] . $word_buf[$word_pos]; - - push @rule, $function_full; - } - - print join (" ", @rule), "\n"; - } -} - diff --git a/hashcat-utils/bin/topmorph.pl b/hashcat-utils/bin/topmorph.pl deleted file mode 100755 index d98b0ef..0000000 --- a/hashcat-utils/bin/topmorph.pl +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env perl - -## Name........: topmorph -## Autor.......: Jens Steube -## License.....: MIT - -use strict; -use warnings; - -my @intpos_to_rulepos = ('0'..'9', 'A'..'Z'); - -my $function = "i"; -#my $function = "o"; - -if (scalar @ARGV != 5) -{ - print "usage: $0 dictionary depth width pos_min pos_max\n"; - - exit -1; -} - -my ($dictionary, $depth, $width, $pos_min, $pos_max) = @ARGV; - -if ($width > 20) -{ - print "width > 20\n"; - - exit -1; -} - -for (my $pos = $pos_min; $pos <= $pos_max; $pos++) -{ - my $db; - - open (IN, $dictionary) or die "$dictionary: $!\n"; - - while (my $line = ) - { - chomp $line; - - my $len = length $line; - - next if (($len - $pos) < $width); - - my $word = substr ($line, $pos, $width); - - next unless defined $word; - - $db->{$word}++; - } - - close (IN); - - my @keys = sort { $db->{$b} <=> $db->{$a} } keys %{$db}; - - for (my $i = 0; $i < $depth; $i++) - { - my @chars = split "", $keys[$i]; - - my @rule; - - for (my $j = 0; $j < $width; $j++) - { - my $function_full = join "", $function, $intpos_to_rulepos[$pos + $j], $chars[$j]; - - push @rule, $function_full; - } - - print join (" ", @rule), "\n"; - } -} diff --git a/hate_crack.py b/hate_crack.py index 1c4ac5b..dacfc58 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -170,15 +170,26 @@ required_binaries = [ for binary, name in required_binaries: binary_path = hashcat_utils_path + '/' + binary + needs_make = False if not os.path.isfile(binary_path): - print(f'Error: {name} binary not found at {binary_path}') - print('Please ensure hashcat-utils is properly installed.') - quit(1) - # Check if binary is executable - if not os.access(binary_path, os.X_OK): - print(f'Error: {name} binary at {binary_path} is not executable') - print('Try running: chmod +x {0}'.format(binary_path)) - quit(1) + print(f'Warning: {name} binary not found at {binary_path}. Attempting to build hashcat-utils...') + needs_make = True + elif not os.access(binary_path, os.X_OK): + print(f'Warning: {name} binary at {binary_path} is not executable. Attempting to build hashcat-utils...') + needs_make = True + if needs_make: + make_dir = os.path.join(hate_path, 'hashcat-utils') + try: + subprocess.run(['make'], cwd=make_dir, check=True) + print('Successfully ran make in hashcat-utils.') + except Exception as e: + print(f'Error running make in hashcat-utils: {e}') + print('Please ensure build tools are installed and try again.') + quit(1) + # Re-check after make + if not os.path.isfile(binary_path) or not os.access(binary_path, os.X_OK): + print(f'Error: {name} binary still not found or not executable at {binary_path} after make.') + quit(1) # Test binary execution try: test_result = subprocess.run(