mirror of
https://github.com/hashcat/hashcat.git
synced 2025-06-30 20:02:41 +00:00
Fix user_options_check_files() in case -b is used
This commit is contained in:
parent
9408c2fec8
commit
e2b2dc7ae0
@ -1348,6 +1348,8 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
// mode easy mode here because both files must exist and readable
|
||||
|
||||
if (user_options_extra->hc_workc == 2)
|
||||
{
|
||||
char *dictfile1 = user_options_extra->hc_workv[0];
|
||||
char *dictfile2 = user_options_extra->hc_workv[1];
|
||||
|
||||
@ -1365,10 +1367,13 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (user_options->attack_mode == ATTACK_MODE_BF)
|
||||
{
|
||||
// if the file exist it's a maskfile and then it must be readable
|
||||
|
||||
if (user_options_extra->hc_workc == 1)
|
||||
{
|
||||
char *maskfile = user_options_extra->hc_workv[0];
|
||||
|
||||
if (hc_path_exist (maskfile) == true)
|
||||
@ -1381,7 +1386,10 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (user_options->attack_mode == ATTACK_MODE_HYBRID1)
|
||||
{
|
||||
if (user_options_extra->hc_workc == 2)
|
||||
{
|
||||
char *wlfile = user_options_extra->hc_workv[0];
|
||||
|
||||
@ -1408,7 +1416,10 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (user_options->attack_mode == ATTACK_MODE_HYBRID2)
|
||||
{
|
||||
if (user_options_extra->hc_workc == 2)
|
||||
{
|
||||
char *wlfile = user_options_extra->hc_workv[1];
|
||||
|
||||
@ -1435,6 +1446,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// logfile
|
||||
|
||||
@ -1557,6 +1569,8 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
|
||||
// dictstat
|
||||
|
||||
if (dictstat_ctx->enabled == true)
|
||||
{
|
||||
if (hc_path_exist (dictstat_ctx->filename) == true)
|
||||
{
|
||||
if (hc_path_write (dictstat_ctx->filename) == false)
|
||||
{
|
||||
@ -1565,6 +1579,7 @@ int user_options_check_files (hashcat_ctx_t *hashcat_ctx)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// loopback - can't check at this point
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user