1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-28 19:08:19 +00:00

Prepare an enum type to represent the final return codes

This commit is contained in:
Jens Steube 2022-09-04 18:10:40 +02:00
parent 93d40beb17
commit 613c863f1d
2 changed files with 9 additions and 2 deletions

View File

@ -224,6 +224,13 @@ typedef enum status_rc
} status_rc_t;
typedef enum rc_final
{
RC_FINAL_OK = 0,
RC_FINAL_EXHAUSTED = 1
} rc_final_t;
typedef enum wl_mode
{
WL_MODE_NONE = 0,

View File

@ -1812,8 +1812,8 @@ int hashcat_session_execute (hashcat_ctx_t *hashcat_ctx)
if (status_ctx->devices_status == STATUS_ABORTED_CHECKPOINT) rc_final = 3;
if (status_ctx->devices_status == STATUS_ABORTED) rc_final = 2;
if (status_ctx->devices_status == STATUS_QUIT) rc_final = 2;
if (status_ctx->devices_status == STATUS_EXHAUSTED) rc_final = 1;
if (status_ctx->devices_status == STATUS_CRACKED) rc_final = 0;
if (status_ctx->devices_status == STATUS_EXHAUSTED) rc_final = RC_FINAL_EXHAUSTED;
if (status_ctx->devices_status == STATUS_CRACKED) rc_final = RC_FINAL_OK;
if (status_ctx->devices_status == STATUS_ERROR) rc_final = -1;
}
else if (rc_final == -1)