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

Fixed --remove was not applied in case all hashes have been cracked by help of potfile or weak-hash check

This commit is contained in:
Jens Steube 2017-03-12 11:05:37 +01:00
parent f651f44606
commit 963a9772ba
3 changed files with 16 additions and 1 deletions

View File

@ -22,6 +22,7 @@
- Fixed a problem where --stdout combined with custom charsets incorrectly displayed an error message - Fixed a problem where --stdout combined with custom charsets incorrectly displayed an error message
- Fixed a typo that resulted in the minimum password length not being correctly initialized - Fixed a typo that resulted in the minimum password length not being correctly initialized
- Fixed a problem with parsing and displaying -m 7000 = Fortigate (FortiOS) hashes - Fixed a problem with parsing and displaying -m 7000 = Fortigate (FortiOS) hashes
- Fixed --remove was not applied in case all hashes have been cracked by help of potfile or weak-hash check
## ##
## Technical ## Technical

View File

@ -504,6 +504,13 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
if (status_ctx->devices_status == STATUS_CRACKED) if (status_ctx->devices_status == STATUS_CRACKED)
{ {
if (hashes->digests_saved != hashes->digests_done)
{
const int rc = save_hash (hashcat_ctx);
if (rc == -1) return -1;
}
EVENT (EVENT_POTFILE_ALL_CRACKED); EVENT (EVENT_POTFILE_ALL_CRACKED);
return 0; return 0;
@ -683,6 +690,13 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
if (status_ctx->devices_status == STATUS_CRACKED) if (status_ctx->devices_status == STATUS_CRACKED)
{ {
if (hashes->digests_saved != hashes->digests_done)
{
const int rc = save_hash (hashcat_ctx);
if (rc == -1) return -1;
}
EVENT (EVENT_WEAK_HASH_ALL_CRACKED); EVENT (EVENT_WEAK_HASH_ALL_CRACKED);
return 0; return 0;

View File

@ -545,7 +545,7 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
hashlist_format = hlfmt_detect (hashcat_ctx, fp, 100); // 100 = max numbers to "scan". could be hashes_avail, too hashlist_format = hlfmt_detect (hashcat_ctx, fp, 100); // 100 = max numbers to "scan". could be hashes_avail, too
if ((user_options->remove == 1) && (hashlist_format != HLFMT_HASHCAT)) if ((user_options->remove == true) && (hashlist_format != HLFMT_HASHCAT))
{ {
event_log_error (hashcat_ctx, "remove not supported in native hashfile-format mode"); event_log_error (hashcat_ctx, "remove not supported in native hashfile-format mode");