1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

Abstract access to digests_done_new via API

This commit is contained in:
Jens Steube 2022-08-18 11:21:34 +02:00
parent c3e18f7fed
commit bf0ffa66d7
4 changed files with 10 additions and 0 deletions

View File

@ -39,6 +39,7 @@ char *status_get_guess_candidates_dev (const hashcat_ctx_t *hash
char *status_get_hash_name (const hashcat_ctx_t *hashcat_ctx); char *status_get_hash_name (const hashcat_ctx_t *hashcat_ctx);
char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx); char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx);
int status_get_digests_done (const hashcat_ctx_t *hashcat_ctx); int status_get_digests_done (const hashcat_ctx_t *hashcat_ctx);
int status_get_digests_done_new (const hashcat_ctx_t *hashcat_ctx);
int status_get_digests_done_pot (const hashcat_ctx_t *hashcat_ctx); int status_get_digests_done_pot (const hashcat_ctx_t *hashcat_ctx);
int status_get_digests_cnt (const hashcat_ctx_t *hashcat_ctx); int status_get_digests_cnt (const hashcat_ctx_t *hashcat_ctx);
double status_get_digests_percent (const hashcat_ctx_t *hashcat_ctx); double status_get_digests_percent (const hashcat_ctx_t *hashcat_ctx);

View File

@ -2640,6 +2640,7 @@ typedef struct hashcat_status
double msec_real; double msec_real;
int digests_cnt; int digests_cnt;
int digests_done; int digests_done;
int digests_done_new;
int digests_done_pot; int digests_done_pot;
double digests_percent; double digests_percent;
int salts_cnt; int salts_cnt;

View File

@ -1927,6 +1927,7 @@ int hashcat_get_status (hashcat_ctx_t *hashcat_ctx, hashcat_status_t *hashcat_st
hashcat_status->digests_cnt = status_get_digests_cnt (hashcat_ctx); hashcat_status->digests_cnt = status_get_digests_cnt (hashcat_ctx);
hashcat_status->digests_done = status_get_digests_done (hashcat_ctx); hashcat_status->digests_done = status_get_digests_done (hashcat_ctx);
hashcat_status->digests_done_new = status_get_digests_done_new (hashcat_ctx);
hashcat_status->digests_done_pot = status_get_digests_done_pot (hashcat_ctx); hashcat_status->digests_done_pot = status_get_digests_done_pot (hashcat_ctx);
hashcat_status->digests_percent = status_get_digests_percent (hashcat_ctx); hashcat_status->digests_percent = status_get_digests_percent (hashcat_ctx);
hashcat_status->hash_target = status_get_hash_target (hashcat_ctx); hashcat_status->hash_target = status_get_hash_target (hashcat_ctx);

View File

@ -893,6 +893,13 @@ int status_get_digests_done (const hashcat_ctx_t *hashcat_ctx)
return hashes->digests_done; return hashes->digests_done;
} }
int status_get_digests_done_new (const hashcat_ctx_t *hashcat_ctx)
{
const hashes_t *hashes = hashcat_ctx->hashes;
return hashes->digests_done - hashes->digests_done_pot;
}
int status_get_digests_done_pot (const hashcat_ctx_t *hashcat_ctx) int status_get_digests_done_pot (const hashcat_ctx_t *hashcat_ctx)
{ {
const hashes_t *hashes = hashcat_ctx->hashes; const hashes_t *hashes = hashcat_ctx->hashes;