1
mirror of https://github.com/hashcat/hashcat synced 2024-11-20 23:27:31 +01:00

hide fan speed from hwmon output if not detected

This commit is contained in:
Gabriele Gristina 2021-06-19 20:46:09 +02:00
parent 3a6481da4e
commit 1703d24c1a
4 changed files with 3 additions and 10 deletions

View File

@ -22,7 +22,7 @@ Gabriele "matrix" Gristina <matrix@hashcat.net> (@gm4tr1x)
* Compressed wordlist feature
* OpenCL Info feature
* Apple macOS port
* Hardware monitor initial code base
* Hardware monitor initial code base and maintenance
* Test suite initial code base
* Makefile initial code base
* Multithreading initial code base

View File

@ -270,7 +270,7 @@ int hm_IOKIT_get_fan_speed_current (void *hashcat_ctx, char *fan_speed_buf)
// remove last two bytes
size_t out_len = strlen (fan_speed_buf);
fan_speed_buf[out_len-2] = '\0';
if (out_len > 2) fan_speed_buf[out_len-2] = '\0';
}
return 1;

View File

@ -1408,13 +1408,6 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
hwmon_ctx->hm_iokit = NULL;
}
if (hwmon_ctx->hm_adl)
{
hcfree (hwmon_ctx->hm_iokit);
hwmon_ctx->hm_iokit = NULL;
}
}
#endif

View File

@ -1796,7 +1796,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
if (device_info->hwmon_dev == NULL) continue;
#if defined(__APPLE__)
if (first_dev && device_info->hwmon_fan_dev)
if (first_dev && strlen (device_info->hwmon_fan_dev) > 0)
{
event_log_info (hashcat_ctx, "Hardware.Mon.SMC.: %s", device_info->hwmon_fan_dev);
first_dev = false;