Skip to content

Commit

Permalink
fixed grep and limits/feature list for hashcat
Browse files Browse the repository at this point in the history
  • Loading branch information
philsmd committed Jan 24, 2017
1 parent 929a12e commit f3c2220
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions 7z2hashcat.pl
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@
my $SHOW_LZMA_DECOMPRESS_AFTER_DECRYPT_WARNING = 1;

my $PASSWORD_RECOVERY_TOOL_NAME = "hashcat";
my $PASSWORD_RECOVERY_TOOL_DATA_LIMIT = 768; # hexadecimal output value. This value should always be >= 64
my @PASSWORD_RECOVERY_TOOL_SUPPORTED_DECOMPRESSORS = (); # within this list we only need values ranging from 1 to 7
# i.e. SEVEN_ZIP_LZMA1_COMPRESSED to SEVEN_ZIP_DEFLATE_COMPRESSED
my $PASSWORD_RECOVERY_TOOL_DATA_LIMIT = 16384; # hexadecimal output value. This value should always be >= 64
my @PASSWORD_RECOVERY_TOOL_SUPPORTED_DECOMPRESSORS = (1, 2); # within this list we only need values ranging from 1 to 7
# i.e. SEVEN_ZIP_LZMA1_COMPRESSED to SEVEN_ZIP_DEFLATE_COMPRESSED

#
# Helper functions
Expand Down Expand Up @@ -1033,7 +1033,7 @@ sub extract_hash_from_archive
{
if ($is_truncated == 0)
{
if (grep ("/^$type_of_compression$/", @PASSWORD_RECOVERY_TOOL_SUPPORTED_DECOMPRESSORS) == 0)
if (grep (/^$type_of_compression$/, @PASSWORD_RECOVERY_TOOL_SUPPORTED_DECOMPRESSORS) == 0)
{
print STDERR "WARNING: to correctly verify the CRC checksum of the data contained within the file '". $file_path . "',\n";
print STDERR "the data must be decompressed using " . $SEVEN_ZIP_COMPRESSOR_NAMES{$type_of_compression};
Expand Down

0 comments on commit f3c2220

Please sign in to comment.