Added core-clock and memory-clock to output in benchmark mode with --machine-readable enabled

pull/581/head
jsteube 8 years ago
parent 12ea82b821
commit 1edc129f8a

@ -20,6 +20,7 @@
- Added support for --powertune-enable for AMD-GPU-PRO driver
- Added option --keep-guessing to continue cracking hashes even after they have been cracked (to find collisions)
- Fixed a bug when cracking a large salted hashlist: If a word is rejected this produces so high CPU load that cracking process doesn't start
- Added core-clock and memory-clock to output in benchmark mode with --machine-readable enabled
##
## Algorithms

@ -73,6 +73,8 @@ double status_get_cpt_avg_hour (const hashcat_ctx_t *hashcat_ctx)
double status_get_cpt_avg_day (const hashcat_ctx_t *hashcat_ctx);
char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx);
char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
int status_get_corespeed_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
int status_get_memoryspeed_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
int status_progress_init (hashcat_ctx_t *hashcat_ctx);
void status_progress_destroy (hashcat_ctx_t *hashcat_ctx);

@ -1565,6 +1565,8 @@ typedef struct
char *speed_sec_dev;
char *input_candidates_dev;
char *hwmon_dev;
int corespeed_dev;
int memoryspeed_dev;
} device_info_t;

@ -1244,6 +1244,8 @@ int hashcat_get_status (hashcat_ctx_t *hashcat_ctx, hashcat_status_t *hashcat_st
device_info->speed_sec_dev = status_get_speed_sec_dev (hashcat_ctx, device_id);
device_info->input_candidates_dev = status_get_input_candidates_dev (hashcat_ctx, device_id);
device_info->hwmon_dev = status_get_hwmon_dev (hashcat_ctx, device_id);
device_info->corespeed_dev = status_get_corespeed_dev (hashcat_ctx, device_id);
device_info->memoryspeed_dev = status_get_memoryspeed_dev (hashcat_ctx, device_id);
}
hashcat_status->hashes_msec_all = status_get_hashes_msec_all (hashcat_ctx);

@ -1503,6 +1503,44 @@ char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int device_i
return output_buf;
}
int status_get_corespeed_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id)
{
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
if (device_param->skipped == true) return -1;
status_ctx_t *status_ctx = hashcat_ctx->status_ctx;
hc_thread_mutex_lock (status_ctx->mux_hwmon);
const int num_corespeed = hm_get_corespeed_with_device_id ((hashcat_ctx_t *) hashcat_ctx, device_id);
hc_thread_mutex_unlock (status_ctx->mux_hwmon);
return num_corespeed;
}
int status_get_memoryspeed_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id)
{
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
hc_device_param_t *device_param = &opencl_ctx->devices_param[device_id];
if (device_param->skipped == true) return -1;
status_ctx_t *status_ctx = hashcat_ctx->status_ctx;
hc_thread_mutex_lock (status_ctx->mux_hwmon);
const int num_memoryspeed = hm_get_memoryspeed_with_device_id ((hashcat_ctx_t *) hashcat_ctx, device_id);
hc_thread_mutex_unlock (status_ctx->mux_hwmon);
return num_memoryspeed;
}
int status_progress_init (hashcat_ctx_t *hashcat_ctx)
{
status_ctx_t *status_ctx = hashcat_ctx->status_ctx;

@ -1008,7 +1008,7 @@ void status_benchmark_automate (hashcat_ctx_t *hashcat_ctx)
if (device_info->skipped_dev == true) continue;
event_log_info (hashcat_ctx, "%u:%u:%" PRIu64, device_id + 1, hash_mode, (u64) (device_info->hashes_msec_dev_benchmark * 1000));
event_log_info (hashcat_ctx, "%u:%u:%d:%d:%" PRIu64, device_id + 1, hash_mode, device_info->corespeed_dev, device_info->memoryspeed_dev, (u64) (device_info->hashes_msec_dev_benchmark * 1000));
}
hcfree (hashcat_status);

@ -922,42 +922,49 @@ void user_options_preprocess (hashcat_ctx_t *hashcat_ctx)
if (user_options->opencl_info == true
|| user_options->keyspace == true
|| user_options->benchmark == true
|| user_options->stdout_flag == true
|| user_options->speed_only == true)
{
user_options->show = false;
user_options->left = false;
user_options->gpu_temp_disable = true;
user_options->left = false;
user_options->logfile_disable = true;
user_options->nvidia_spin_damp = 0;
user_options->outfile_check_timer = 0;
user_options->potfile_disable = true;
user_options->powertune_enable = false;
user_options->restore = false;
user_options->restore_disable = true;
user_options->restore = false;
user_options->restore_timer = 0;
user_options->logfile_disable = true;
user_options->weak_hash_threshold = 0;
user_options->nvidia_spin_damp = 0;
user_options->show = false;
user_options->status = false;
user_options->status_timer = 0;
user_options->outfile_check_timer = 0;
user_options->weak_hash_threshold = 0;
}
if (user_options->benchmark == true)
{
user_options->session = "benchmark";
user_options->attack_mode = ATTACK_MODE_BF;
user_options->gpu_temp_disable = false;
user_options->increment = false;
user_options->left = false;
user_options->logfile_disable = true;
user_options->nvidia_spin_damp = 0;
user_options->potfile_disable = true;
user_options->powertune_enable = true;
user_options->restore_disable = true;
user_options->restore = false;
user_options->restore_timer = 0;
user_options->session = "benchmark";
user_options->show = false;
user_options->status = false;
user_options->status_timer = 0;
user_options->speed_only = true;
user_options->weak_hash_threshold = 0;
if (user_options->workload_profile_chgd == false)
{
user_options->workload_profile = 3;
}
if (user_options->powertune_enable == true)
{
user_options->gpu_temp_disable = false;
}
}
if (user_options->keyspace == true)

Loading…
Cancel
Save