Skip to content

Commit

Permalink
Make skipped device warning respect --quiet
Browse files Browse the repository at this point in the history
The other usual device information does not show when using --quiet, only the skipped warning does, making it a little out of place. Old:
```
> ./hashcat -m 99999 abcdef -a 3 abcdef --quiet
The device hashcat#2 specifically listed was skipped because it is an alias of device #1

abcdef:abcdef
>
```
New:
```
> ./hashcat -m 99999 abcdef -a 3 abcdef --quiet
abcdef:abcdef
```
  • Loading branch information
PenguinKeeper7 committed Feb 29, 2024
1 parent fafb277 commit 16b249c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend.c
Expand Up @@ -90,6 +90,7 @@ static bool is_same_device (const hc_device_param_t *src, const hc_device_param_
static int backend_ctx_find_alias_devices (hashcat_ctx_t *hashcat_ctx)
{
backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
user_options_t *user_options = hashcat_ctx->user_options;

// first identify all aliases

Expand Down Expand Up @@ -157,7 +158,7 @@ static int backend_ctx_find_alias_devices (hashcat_ctx_t *hashcat_ctx)

// show a warning for specifically listed devices if they are an alias

if (backend_ctx->backend_devices_filter[alias_device->device_id])
if (backend_ctx->backend_devices_filter[alias_device->device_id] && user_options->quiet == false)
{
event_log_warning (hashcat_ctx, "The device #%d specifically listed was skipped because it is an alias of device #%d", alias_device->device_id + 1, backend_device->device_id + 1);
event_log_warning (hashcat_ctx, NULL);
Expand Down

0 comments on commit 16b249c

Please sign in to comment.