mirror of
https://github.com/hashcat/hashcat
synced 2024-11-20 23:27:31 +01:00
Status: Do not show Recovered/Time as floats but as integers to reduce over-information
This commit is contained in:
parent
813911788a
commit
3c40b88eff
@ -164,6 +164,7 @@ The CLI (hashcat.bin or hashcat.exe) works as before but from a technical perspe
|
||||
- Status: Added Input.Queue.Base and Input.Queue.Mod to help the user better understand this concept
|
||||
- Status: Do not wait for the progress mutex to read and store speed timer
|
||||
- Status: Do not show Recovered/Time when cracking < 1000 hashes
|
||||
- Status: Do not show Recovered/Time as floats but as integers to reduce over-information
|
||||
- Tests: Removed rules_test/ subproject: Would require total rewrite but not used in a long time
|
||||
- Threads: Replaced all calls to getpwuid() with getpwuid_r() to ensure thread safety
|
||||
- Threads: Replaced all calls to gmtime() with gmtime_r() to ensure thread safety
|
||||
|
@ -74,9 +74,9 @@ char *status_get_speed_sec_dev (const hashcat_ctx_t *hashcat_ctx,
|
||||
int status_get_cpt_cur_min (const hashcat_ctx_t *hashcat_ctx);
|
||||
int status_get_cpt_cur_hour (const hashcat_ctx_t *hashcat_ctx);
|
||||
int status_get_cpt_cur_day (const hashcat_ctx_t *hashcat_ctx);
|
||||
double status_get_cpt_avg_min (const hashcat_ctx_t *hashcat_ctx);
|
||||
double status_get_cpt_avg_hour (const hashcat_ctx_t *hashcat_ctx);
|
||||
double status_get_cpt_avg_day (const hashcat_ctx_t *hashcat_ctx);
|
||||
int status_get_cpt_avg_min (const hashcat_ctx_t *hashcat_ctx);
|
||||
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);
|
||||
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);
|
||||
|
26
src/status.c
26
src/status.c
@ -1481,7 +1481,7 @@ int status_get_cpt_cur_day (const hashcat_ctx_t *hashcat_ctx)
|
||||
return cpt_cur_day;
|
||||
}
|
||||
|
||||
double status_get_cpt_avg_min (const hashcat_ctx_t *hashcat_ctx)
|
||||
int status_get_cpt_avg_min (const hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
const cpt_ctx_t *cpt_ctx = hashcat_ctx->cpt_ctx;
|
||||
|
||||
@ -1489,10 +1489,10 @@ double status_get_cpt_avg_min (const hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
const double cpt_avg_min = (double) cpt_ctx->cpt_total / ((msec_real / 1000) / 60);
|
||||
|
||||
return cpt_avg_min;
|
||||
return (int) cpt_avg_min;
|
||||
}
|
||||
|
||||
double status_get_cpt_avg_hour (const hashcat_ctx_t *hashcat_ctx)
|
||||
int status_get_cpt_avg_hour (const hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
const cpt_ctx_t *cpt_ctx = hashcat_ctx->cpt_ctx;
|
||||
|
||||
@ -1500,10 +1500,10 @@ double status_get_cpt_avg_hour (const hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
const double cpt_avg_hour = (double) cpt_ctx->cpt_total / ((msec_real / 1000) / 3600);
|
||||
|
||||
return cpt_avg_hour;
|
||||
return (int) cpt_avg_hour;
|
||||
}
|
||||
|
||||
double status_get_cpt_avg_day (const hashcat_ctx_t *hashcat_ctx)
|
||||
int status_get_cpt_avg_day (const hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
const cpt_ctx_t *cpt_ctx = hashcat_ctx->cpt_ctx;
|
||||
|
||||
@ -1511,7 +1511,7 @@ double status_get_cpt_avg_day (const hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
const double cpt_avg_day = (double) cpt_ctx->cpt_total / ((msec_real / 1000) / 86400);
|
||||
|
||||
return cpt_avg_day;
|
||||
return (int) cpt_avg_day;
|
||||
}
|
||||
|
||||
char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx)
|
||||
@ -1526,13 +1526,13 @@ char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx)
|
||||
const int cpt_cur_hour = status_get_cpt_cur_hour (hashcat_ctx);
|
||||
const int cpt_cur_day = status_get_cpt_cur_day (hashcat_ctx);
|
||||
|
||||
const double cpt_avg_min = status_get_cpt_avg_min (hashcat_ctx);
|
||||
const double cpt_avg_hour = status_get_cpt_avg_hour (hashcat_ctx);
|
||||
const double cpt_avg_day = status_get_cpt_avg_day (hashcat_ctx);
|
||||
const int cpt_avg_min = status_get_cpt_avg_min (hashcat_ctx);
|
||||
const int cpt_avg_hour = status_get_cpt_avg_hour (hashcat_ctx);
|
||||
const int cpt_avg_day = status_get_cpt_avg_day (hashcat_ctx);
|
||||
|
||||
if ((cpt_ctx->cpt_start + 86400) < now)
|
||||
{
|
||||
snprintf (cpt, HCBUFSIZ_TINY - 1, "CUR:%d,%d,%d AVG:%0.2f,%0.2f,%0.2f (Min,Hour,Day)",
|
||||
snprintf (cpt, HCBUFSIZ_TINY - 1, "CUR:%d,%d,%d AVG:%d,%d,%d (Min,Hour,Day)",
|
||||
cpt_cur_min,
|
||||
cpt_cur_hour,
|
||||
cpt_cur_day,
|
||||
@ -1542,7 +1542,7 @@ char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx)
|
||||
}
|
||||
else if ((cpt_ctx->cpt_start + 3600) < now)
|
||||
{
|
||||
snprintf (cpt, HCBUFSIZ_TINY - 1, "CUR:%d,%d,N/A AVG:%0.2f,%0.2f,%0.2f (Min,Hour,Day)",
|
||||
snprintf (cpt, HCBUFSIZ_TINY - 1, "CUR:%d,%d,N/A AVG:%d,%d,%d (Min,Hour,Day)",
|
||||
cpt_cur_min,
|
||||
cpt_cur_hour,
|
||||
cpt_avg_min,
|
||||
@ -1551,7 +1551,7 @@ char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx)
|
||||
}
|
||||
else if ((cpt_ctx->cpt_start + 60) < now)
|
||||
{
|
||||
snprintf (cpt, HCBUFSIZ_TINY - 1, "CUR:%d,N/A,N/A AVG:%0.2f,%0.2f,%0.2f (Min,Hour,Day)",
|
||||
snprintf (cpt, HCBUFSIZ_TINY - 1, "CUR:%d,N/A,N/A AVG:%d,%d,%d (Min,Hour,Day)",
|
||||
cpt_cur_min,
|
||||
cpt_avg_min,
|
||||
cpt_avg_hour,
|
||||
@ -1559,7 +1559,7 @@ char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx)
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf (cpt, HCBUFSIZ_TINY - 1, "CUR:N/A,N/A,N/A AVG:%0.2f,%0.2f,%0.2f (Min,Hour,Day)",
|
||||
snprintf (cpt, HCBUFSIZ_TINY - 1, "CUR:N/A,N/A,N/A AVG:%d,%d,%d (Min,Hour,Day)",
|
||||
cpt_avg_min,
|
||||
cpt_avg_hour,
|
||||
cpt_avg_day);
|
||||
|
Loading…
Reference in New Issue
Block a user