mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-22 22:58:30 +00:00
commit
3c4cb5c0f8
@ -95,6 +95,8 @@ char *status_get_brain_link_recv_bytes_dev (const hashcat_ctx_t *hash
|
||||
char *status_get_brain_link_send_bytes_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
|
||||
char *status_get_brain_link_recv_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
|
||||
char *status_get_brain_link_send_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
|
||||
char *status_get_brain_rx_all (const hashcat_ctx_t *hashcat_ctx);
|
||||
char *status_get_brain_tx_all (const hashcat_ctx_t *hashcat_ctx);
|
||||
#endif
|
||||
char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
|
||||
int status_get_corespeed_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
|
||||
|
@ -2105,6 +2105,8 @@ typedef struct hashcat_status
|
||||
#ifdef WITH_BRAIN
|
||||
int brain_session;
|
||||
int brain_attack;
|
||||
char *brain_rx_all;
|
||||
char *brain_tx_all;
|
||||
#endif
|
||||
const char *status_string;
|
||||
int status_number;
|
||||
|
@ -1502,6 +1502,8 @@ int hashcat_get_status (hashcat_ctx_t *hashcat_ctx, hashcat_status_t *hashcat_st
|
||||
device_info->brain_link_send_bytes_dev = status_get_brain_link_send_bytes_dev (hashcat_ctx, device_id);
|
||||
device_info->brain_link_recv_bytes_sec_dev = status_get_brain_link_recv_bytes_sec_dev (hashcat_ctx, device_id);
|
||||
device_info->brain_link_send_bytes_sec_dev = status_get_brain_link_send_bytes_sec_dev (hashcat_ctx, device_id);
|
||||
hashcat_status->brain_rx_all = status_get_brain_rx_all (hashcat_ctx);
|
||||
hashcat_status->brain_tx_all = status_get_brain_tx_all (hashcat_ctx);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
44
src/status.c
44
src/status.c
@ -1833,6 +1833,28 @@ char *status_get_brain_link_recv_bytes_dev (const hashcat_ctx_t *hashcat_ctx, co
|
||||
return display;
|
||||
}
|
||||
|
||||
char *status_get_brain_rx_all (const hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
|
||||
double brain_rx_all = 0;
|
||||
|
||||
for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
|
||||
{
|
||||
hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
|
||||
if ((device_param->skipped == false) && (device_param->skipped_warning == false))
|
||||
{
|
||||
brain_rx_all += device_param->brain_link_recv_bytes;
|
||||
}
|
||||
}
|
||||
|
||||
char *display = (char *) hcmalloc (HCBUFSIZ_TINY);
|
||||
|
||||
format_speed_display_1k (brain_rx_all, display, HCBUFSIZ_TINY);
|
||||
|
||||
return display;
|
||||
|
||||
}
|
||||
|
||||
char *status_get_brain_link_send_bytes_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
|
||||
{
|
||||
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
|
||||
@ -1853,6 +1875,28 @@ char *status_get_brain_link_send_bytes_dev (const hashcat_ctx_t *hashcat_ctx, co
|
||||
return display;
|
||||
}
|
||||
|
||||
char *status_get_brain_tx_all (const hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
|
||||
double brain_tx_all = 0;
|
||||
|
||||
for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
|
||||
{
|
||||
hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
|
||||
if ((device_param->skipped == false) && (device_param->skipped_warning == false))
|
||||
{
|
||||
brain_tx_all += device_param->brain_link_send_bytes;
|
||||
}
|
||||
}
|
||||
|
||||
char *display = (char *) hcmalloc (HCBUFSIZ_TINY);
|
||||
|
||||
format_speed_display_1k (brain_tx_all, display, HCBUFSIZ_TINY);
|
||||
|
||||
return display;
|
||||
|
||||
}
|
||||
|
||||
char *status_get_brain_link_recv_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
|
||||
{
|
||||
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
|
||||
|
@ -1511,6 +1511,10 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
|
||||
#ifdef WITH_BRAIN
|
||||
if (user_options->brain_client == true)
|
||||
{
|
||||
event_log_info (hashcat_ctx,
|
||||
"Brain.Link.All...: RX: %sB, TX: %sB",
|
||||
hashcat_status->brain_rx_all,
|
||||
hashcat_status->brain_tx_all);
|
||||
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