mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-31 19:01:05 +00:00
Add a tracker for salts, amplifier and iterations to status screen
This commit is contained in:
parent
6092308324
commit
27db8ced7e
@ -7,6 +7,7 @@
|
||||
- Workaround some AMD OpenCL runtime segmentation faults
|
||||
- Allow bitcoin master key length not be exactly 96 byte a multiple of 16
|
||||
- Getting rid of OPTS_TYPE_HASH_COPY for Ansible Vault
|
||||
- Add a tracker for salts, amplifier and iterations to status screen
|
||||
|
||||
##
|
||||
## Bugs
|
||||
|
@ -79,6 +79,9 @@ int status_get_cpt_avg_min (const hashcat_ctx_t *hashcat_
|
||||
int status_get_cpt_avg_hour (const hashcat_ctx_t *hashcat_ctx);
|
||||
int status_get_cpt_avg_day (const hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx);
|
||||
int status_get_salt_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
|
||||
int status_get_innerloop_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
|
||||
int status_get_iteration_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id);
|
||||
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);
|
||||
|
@ -43,6 +43,11 @@ typedef uint16_t u16;
|
||||
typedef uint32_t u32;
|
||||
typedef uint64_t u64;
|
||||
|
||||
typedef int8_t i8;
|
||||
typedef int16_t i16;
|
||||
typedef int32_t i32;
|
||||
typedef int64_t i64;
|
||||
|
||||
// timer
|
||||
|
||||
#if defined (_WIN)
|
||||
@ -1857,6 +1862,9 @@ typedef struct device_info
|
||||
int kernel_loops_dev;
|
||||
int kernel_threads_dev;
|
||||
int vector_width_dev;
|
||||
int salt_pos_dev;
|
||||
int innerloop_pos_dev;
|
||||
int iteration_pos_dev;
|
||||
|
||||
} device_info_t;
|
||||
|
||||
|
@ -1401,6 +1401,9 @@ int hashcat_get_status (hashcat_ctx_t *hashcat_ctx, hashcat_status_t *hashcat_st
|
||||
device_info->kernel_loops_dev = status_get_kernel_loops_dev (hashcat_ctx, device_id);
|
||||
device_info->kernel_threads_dev = status_get_kernel_threads_dev (hashcat_ctx, device_id);
|
||||
device_info->vector_width_dev = status_get_vector_width_dev (hashcat_ctx, device_id);
|
||||
device_info->salt_pos_dev = status_get_salt_pos_dev (hashcat_ctx, device_id);
|
||||
device_info->innerloop_pos_dev = status_get_innerloop_pos_dev (hashcat_ctx, device_id);
|
||||
device_info->iteration_pos_dev = status_get_iteration_pos_dev (hashcat_ctx, device_id);
|
||||
}
|
||||
|
||||
hashcat_status->hashes_msec_all = status_get_hashes_msec_all (hashcat_ctx);
|
||||
|
48
src/status.c
48
src/status.c
@ -1656,6 +1656,54 @@ char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx)
|
||||
return cpt;
|
||||
}
|
||||
|
||||
int status_get_salt_pos_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];
|
||||
|
||||
int salt_pos = 0;
|
||||
|
||||
if (device_param->skipped == false)
|
||||
{
|
||||
salt_pos = (int) device_param->kernel_params_buf32[27];
|
||||
}
|
||||
|
||||
return salt_pos;
|
||||
}
|
||||
|
||||
int status_get_innerloop_pos_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];
|
||||
|
||||
int innerloop_pos = 0;
|
||||
|
||||
if (device_param->skipped == false)
|
||||
{
|
||||
innerloop_pos = (int) device_param->innerloop_pos;
|
||||
}
|
||||
|
||||
return innerloop_pos;
|
||||
}
|
||||
|
||||
int status_get_iteration_pos_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];
|
||||
|
||||
int iteration_pos = 0;
|
||||
|
||||
if (device_param->skipped == false)
|
||||
{
|
||||
iteration_pos = (int) device_param->kernel_params_buf32[28];
|
||||
}
|
||||
|
||||
return iteration_pos;
|
||||
}
|
||||
|
||||
char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id)
|
||||
{
|
||||
const opencl_ctx_t *opencl_ctx = hashcat_ctx->opencl_ctx;
|
||||
|
@ -1290,6 +1290,19 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
|
||||
break;
|
||||
}
|
||||
|
||||
for (int device_id = 0; device_id < hashcat_status->device_info_cnt; device_id++)
|
||||
{
|
||||
const device_info_t *device_info = hashcat_status->device_info_buf + device_id;
|
||||
|
||||
if (device_info->skipped_dev == true) continue;
|
||||
|
||||
event_log_info (hashcat_ctx,
|
||||
"Restore.Sub.#%d...: Salt:%d Amplifier:%d Iteration:%d", device_id + 1,
|
||||
device_info->salt_pos_dev,
|
||||
device_info->innerloop_pos_dev,
|
||||
device_info->iteration_pos_dev);
|
||||
}
|
||||
|
||||
for (int device_id = 0; device_id < hashcat_status->device_info_cnt; device_id++)
|
||||
{
|
||||
const device_info_t *device_info = hashcat_status->device_info_buf + device_id;
|
||||
|
Loading…
Reference in New Issue
Block a user