Merge pull request #1177 from philsmd/master

fixes #1175: custom charsets and --stdout triggered a missing mask error
pull/1179/head
Jens Steube 7 years ago committed by GitHub
commit f651f44606

@ -19,6 +19,7 @@
##
- Fixed a problem where --keyspace combined with custom charsets incorrectly displayed an error message
- Fixed a problem where --stdout combined with custom charsets incorrectly displayed an error message
- Fixed a typo that resulted in the minimum password length not being correctly initialized
- Fixed a problem with parsing and displaying -m 7000 = Fortigate (FortiOS) hashes

@ -821,14 +821,28 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx)
return -1;
}
if (user_options->hc_argc < 2)
// detect if mask was specified:
bool mask_is_missing = true;
if (user_options->keyspace == true) // special case if --keyspace was used: we need the mask but no hash file
{
if (user_options->keyspace == false) // --keyspace would be a special case, i.e. we do not need a hash file
{
event_log_error (hashcat_ctx, "You need to specify a mask if you specify a custom-charset");
if (user_options->hc_argc > 0) mask_is_missing = false;
}
else if (user_options->stdout_flag == true) // special case if --stdout was used: we need the mask but no hash file
{
if (user_options->hc_argc > 0) mask_is_missing = false;
}
else
{
if (user_options->hc_argc > 1) mask_is_missing = false;
}
return -1;
}
if (mask_is_missing == true)
{
event_log_error (hashcat_ctx, "You need to specify a mask if you specify a custom-charset");
return -1;
}
}

Loading…
Cancel
Save