mirror of
https://github.com/hashcat/hashcat.git
synced 2025-06-25 17:32:38 +00:00
Status View: Include time and duration info when pausing and resuming
This commit is contained in:
parent
2a5300a5d6
commit
ce41316ac3
@ -42,13 +42,14 @@
|
|||||||
## Technical
|
## Technical
|
||||||
##
|
##
|
||||||
|
|
||||||
- File handling: Do not abort on seeing a BOM in input files, just warn and ignore the BOM
|
|
||||||
- Brain: Add brain_ctx_t to hashcat_ctx_t to enable runtime check if hashcat was compiled with brain support
|
|
||||||
- Autodetect: Limit the number of errors per hash-mode try to 100 to avoid long startup time
|
- Autodetect: Limit the number of errors per hash-mode try to 100 to avoid long startup time
|
||||||
|
- Brain: Add brain_ctx_t to hashcat_ctx_t to enable runtime check if hashcat was compiled with brain support
|
||||||
|
- File handling: Do not abort on seeing a BOM in input files, just warn and ignore the BOM
|
||||||
- Folders: Do not escape the variable cpath_real to prevent certain OpenCL runtimes from running into an error which do not support escape characters
|
- Folders: Do not escape the variable cpath_real to prevent certain OpenCL runtimes from running into an error which do not support escape characters
|
||||||
- LM: Workaround JiT compiler bug in -m 3000 on NV leading to false negatives with large amount of hashes
|
- LM: Workaround JiT compiler bug in -m 3000 on NV leading to false negatives with large amount of hashes
|
||||||
- Tests: Changed tests for VeraCrypt from -a 0 to -a 3, because password extension is not available to all shells
|
|
||||||
- OpenCL Runtime: Workaround JiT crash (SC failed. No reason given.) on macOS by limiting local memory allocations to 32k
|
- OpenCL Runtime: Workaround JiT crash (SC failed. No reason given.) on macOS by limiting local memory allocations to 32k
|
||||||
|
- Status View: Include time and duration info when pausing and resuming
|
||||||
|
- Tests: Changed tests for VeraCrypt from -a 0 to -a 3, because password extension is not available to all shells
|
||||||
|
|
||||||
* changes v6.2.1 -> v6.2.2
|
* changes v6.2.1 -> v6.2.2
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "hwmon.h"
|
#include "hwmon.h"
|
||||||
#include "interface.h"
|
#include "interface.h"
|
||||||
#include "hashcat.h"
|
#include "hashcat.h"
|
||||||
|
#include "timer.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
|
|
||||||
static const size_t TERMINAL_LINE_LENGTH = 79;
|
static const size_t TERMINAL_LINE_LENGTH = 79;
|
||||||
@ -260,11 +261,24 @@ static void keypress (hashcat_ctx_t *hashcat_ctx)
|
|||||||
{
|
{
|
||||||
event_log_info (hashcat_ctx, NULL);
|
event_log_info (hashcat_ctx, NULL);
|
||||||
|
|
||||||
|
time_t now;
|
||||||
|
|
||||||
|
time (&now);
|
||||||
|
|
||||||
SuspendThreads (hashcat_ctx);
|
SuspendThreads (hashcat_ctx);
|
||||||
|
|
||||||
if (status_ctx->devices_status == STATUS_PAUSED)
|
if (status_ctx->devices_status == STATUS_PAUSED)
|
||||||
{
|
{
|
||||||
event_log_info (hashcat_ctx, "Paused");
|
char buf[32] = { 0 };
|
||||||
|
|
||||||
|
char *pause_time = ctime_r (&now, buf);
|
||||||
|
|
||||||
|
const size_t pause_time_len = strlen (pause_time);
|
||||||
|
|
||||||
|
if (pause_time[pause_time_len - 1] == '\n') pause_time[pause_time_len - 1] = 0;
|
||||||
|
if (pause_time[pause_time_len - 2] == '\r') pause_time[pause_time_len - 2] = 0;
|
||||||
|
|
||||||
|
event_log_info (hashcat_ctx, "Paused at %s", pause_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
event_log_info (hashcat_ctx, NULL);
|
event_log_info (hashcat_ctx, NULL);
|
||||||
@ -280,11 +294,39 @@ static void keypress (hashcat_ctx_t *hashcat_ctx)
|
|||||||
{
|
{
|
||||||
event_log_info (hashcat_ctx, NULL);
|
event_log_info (hashcat_ctx, NULL);
|
||||||
|
|
||||||
|
time_t now;
|
||||||
|
|
||||||
|
time (&now);
|
||||||
|
|
||||||
|
const double msec_paused = hc_timer_get (status_ctx->timer_paused);
|
||||||
|
|
||||||
ResumeThreads (hashcat_ctx);
|
ResumeThreads (hashcat_ctx);
|
||||||
|
|
||||||
if (status_ctx->devices_status != STATUS_PAUSED)
|
if (status_ctx->devices_status != STATUS_PAUSED)
|
||||||
{
|
{
|
||||||
event_log_info (hashcat_ctx, "Resumed");
|
char buf[32] = { 0 };
|
||||||
|
|
||||||
|
char *resume_time = ctime_r (&now, buf);
|
||||||
|
|
||||||
|
const size_t resume_time_len = strlen (resume_time);
|
||||||
|
|
||||||
|
if (resume_time[resume_time_len - 1] == '\n') resume_time[resume_time_len - 1] = 0;
|
||||||
|
if (resume_time[resume_time_len - 2] == '\r') resume_time[resume_time_len - 2] = 0;
|
||||||
|
|
||||||
|
struct tm *tmp;
|
||||||
|
struct tm tm;
|
||||||
|
|
||||||
|
time_t sec_run = msec_paused / 1000;
|
||||||
|
|
||||||
|
tmp = gmtime_r (&sec_run, &tm);
|
||||||
|
|
||||||
|
char *display_pause = (char *) hcmalloc (HCBUFSIZ_TINY);
|
||||||
|
|
||||||
|
format_timer_display (tmp, display_pause, HCBUFSIZ_TINY);
|
||||||
|
|
||||||
|
event_log_info (hashcat_ctx, "Resumed at %s (paused for %s)", resume_time, display_pause);
|
||||||
|
|
||||||
|
hcfree (display_pause);
|
||||||
}
|
}
|
||||||
|
|
||||||
event_log_info (hashcat_ctx, NULL);
|
event_log_info (hashcat_ctx, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user