mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-24 08:58:13 +00:00
Merge branch 'master' of https://github.com/hashcat/hashcat
This commit is contained in:
commit
7ea6e1c65b
@ -41,6 +41,7 @@ static int pthread_setaffinity_np (pthread_t thread, size_t cpu_size, cpu_set_t
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (__FreeBSD__)
|
#if defined (__FreeBSD__)
|
||||||
|
#include <pthread_np.h>
|
||||||
typedef cpuset_t cpu_set_t;
|
typedef cpuset_t cpu_set_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -50,6 +50,8 @@ static int get_exec_path (char *exec_path, const size_t exec_path_sz)
|
|||||||
|
|
||||||
#elif defined (__FreeBSD__)
|
#elif defined (__FreeBSD__)
|
||||||
|
|
||||||
|
#include <sys/sysctl.h>
|
||||||
|
|
||||||
int mib[4];
|
int mib[4];
|
||||||
|
|
||||||
mib[0] = CTL_KERN;
|
mib[0] = CTL_KERN;
|
||||||
|
17
src/hwmon.c
17
src/hwmon.c
@ -1358,7 +1358,14 @@ static int hm_XNVCTRL_get_fan_control (hashcat_ctx_t *hashcat_ctx, const int gpu
|
|||||||
|
|
||||||
if (rc == false)
|
if (rc == false)
|
||||||
{
|
{
|
||||||
event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute(NV_CTRL_GPU_COOLER_MANUAL_CONTROL) failed");
|
event_log_error (hashcat_ctx, "XNVCTRLQueryTargetAttribute() failed");
|
||||||
|
|
||||||
|
// help the user to fix the problem
|
||||||
|
|
||||||
|
event_log_warning (hashcat_ctx, "This error typically occurs when you did not setup NVidia Coolbits.");
|
||||||
|
event_log_warning (hashcat_ctx, "Run the following command to fix: sudo nvidia-xconfig --cool-bits=12");
|
||||||
|
event_log_warning (hashcat_ctx, "Do not forget to restart X afterwards.");
|
||||||
|
event_log_warning (hashcat_ctx, "");
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2837,6 +2844,7 @@ int hm_get_fanpolicy_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 devic
|
|||||||
if (hm_ADL_Overdrive5_FanSpeed_Get (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, 0, &lpFanSpeedValue) == -1)
|
if (hm_ADL_Overdrive5_FanSpeed_Get (hashcat_ctx, hwmon_ctx->hm_device[device_id].adl, 0, &lpFanSpeedValue) == -1)
|
||||||
{
|
{
|
||||||
hwmon_ctx->hm_device[device_id].fanpolicy_get_supported = false;
|
hwmon_ctx->hm_device[device_id].fanpolicy_get_supported = false;
|
||||||
|
hwmon_ctx->hm_device[device_id].fanspeed_get_supported = false;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -2861,6 +2869,7 @@ int hm_get_fanpolicy_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 devic
|
|||||||
}
|
}
|
||||||
|
|
||||||
hwmon_ctx->hm_device[device_id].fanpolicy_get_supported = false;
|
hwmon_ctx->hm_device[device_id].fanpolicy_get_supported = false;
|
||||||
|
hwmon_ctx->hm_device[device_id].fanspeed_get_supported = false;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -3415,7 +3424,7 @@ int hm_set_fanspeed_with_device_id_xnvctrl (hashcat_ctx_t *hashcat_ctx, const u3
|
|||||||
|
|
||||||
if (hwmon_ctx->enabled == false) return -1;
|
if (hwmon_ctx->enabled == false) return -1;
|
||||||
|
|
||||||
if (hwmon_ctx->hm_device[device_id].fanspeed_set_supported == false) return -1;
|
if (hwmon_ctx->hm_device[device_id].fanspeed_set_supported == false) return -1;
|
||||||
|
|
||||||
if (hwmon_ctx->hm_xnvctrl)
|
if (hwmon_ctx->hm_xnvctrl)
|
||||||
{
|
{
|
||||||
@ -3472,6 +3481,7 @@ static int hm_set_fanctrl_with_device_id_xnvctrl (hashcat_ctx_t *hashcat_ctx, co
|
|||||||
if (hm_XNVCTRL_set_fan_control (hashcat_ctx, hwmon_ctx->hm_device[device_id].xnvctrl, val) == -1)
|
if (hm_XNVCTRL_set_fan_control (hashcat_ctx, hwmon_ctx->hm_device[device_id].xnvctrl, val) == -1)
|
||||||
{
|
{
|
||||||
hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false;
|
hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false;
|
||||||
|
hwmon_ctx->hm_device[device_id].fanspeed_set_supported = false;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -3480,6 +3490,7 @@ static int hm_set_fanctrl_with_device_id_xnvctrl (hashcat_ctx_t *hashcat_ctx, co
|
|||||||
}
|
}
|
||||||
|
|
||||||
hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false;
|
hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false;
|
||||||
|
hwmon_ctx->hm_device[device_id].fanspeed_set_supported = false;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -3497,6 +3508,7 @@ static int hm_set_fanctrl_with_device_id_sysfs (hashcat_ctx_t *hashcat_ctx, cons
|
|||||||
if (hm_SYSFS_set_fan_control (hashcat_ctx, device_id, val) == -1)
|
if (hm_SYSFS_set_fan_control (hashcat_ctx, device_id, val) == -1)
|
||||||
{
|
{
|
||||||
hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false;
|
hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false;
|
||||||
|
hwmon_ctx->hm_device[device_id].fanspeed_set_supported = false;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -3505,6 +3517,7 @@ static int hm_set_fanctrl_with_device_id_sysfs (hashcat_ctx_t *hashcat_ctx, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false;
|
hwmon_ctx->hm_device[device_id].fanpolicy_set_supported = false;
|
||||||
|
hwmon_ctx->hm_device[device_id].fanspeed_set_supported = false;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
|
|||||||
|
|
||||||
const int sleep_time = 1;
|
const int sleep_time = 1;
|
||||||
const int temp_threshold = 1; // degrees celcius
|
const int temp_threshold = 1; // degrees celcius
|
||||||
const int fan_speed_min = 20; // in percentage
|
const int fan_speed_min = 33; // in percentage
|
||||||
const int fan_speed_max = 100;
|
const int fan_speed_max = 100;
|
||||||
const float exec_low = 50.0f; // in ms
|
const float exec_low = 50.0f; // in ms
|
||||||
const float util_low = 90.0f; // in percent
|
const float util_low = 90.0f; // in percent
|
||||||
|
Loading…
Reference in New Issue
Block a user