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

Dictionary Cache: Split long status line into multiple lines to stay < 80 chars

This commit is contained in:
jsteube 2017-03-25 16:11:01 +01:00
parent e734e39df1
commit 99fbaa8bcc
4 changed files with 73 additions and 64 deletions

View File

@ -40,6 +40,7 @@
##
- Building: Added missing prototypes for atlassian_parse_hash function
- Dictionary Cache: Split long status line into multiple lines to stay < 80 chars
- Files: Detect and error when users try to use -r with a parameter which is not a file
- Parameter: Detect and error when users try to use an empty string (length 0) for parameters like --session=
- Parameter: Detect and error when users try to use a non-digit where a digit is expected

View File

@ -744,7 +744,11 @@ static void main_wordlist_cache_hit (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MA
cache_hit_t *cache_hit = (cache_hit_t *) buf;
event_log_info (hashcat_ctx, "Cache-hit dictionary stats %s: %" PRId64 " bytes, %" PRIu64 " words, %" PRIu64 " keyspace", cache_hit->dictfile, cache_hit->stat.st_size, cache_hit->cached_cnt, cache_hit->keyspace);
event_log_info (hashcat_ctx, "Dictionary cache hit:");
event_log_info (hashcat_ctx, "* Filename..: %s", cache_hit->dictfile);
event_log_info (hashcat_ctx, "* Passwords.: %" PRIu64, cache_hit->cached_cnt);
event_log_info (hashcat_ctx, "* Bytes.....: %" PRId64, cache_hit->stat.st_size);
event_log_info (hashcat_ctx, "* Keyspace..: %" PRIu64, cache_hit->keyspace);
event_log_info (hashcat_ctx, NULL);
}
@ -758,11 +762,15 @@ static void main_wordlist_cache_generate (MAYBE_UNUSED hashcat_ctx_t *hashcat_ct
if (cache_generate->percent < 100)
{
event_log_info_nn (hashcat_ctx, "Generating dictionary stats for %s: %" PRIu64 " bytes (%.2f%%), %" PRIu64 " words, %" PRIu64 " keyspace", cache_generate->dictfile, cache_generate->comp, cache_generate->percent, cache_generate->cnt2, cache_generate->cnt);
event_log_info_nn (hashcat_ctx, "Dictionary cache building %s: %" PRIu64 " bytes (%.2f%%)", cache_generate->dictfile, cache_generate->comp, cache_generate->percent);
}
else
{
event_log_info (hashcat_ctx, "Generated dictionary stats for %s: %" PRIu64 " bytes, %" PRIu64 " words, %" PRIu64 " keyspace", cache_generate->dictfile, cache_generate->comp, cache_generate->cnt2, cache_generate->cnt);
event_log_info (hashcat_ctx, "Dictionary cache built:");
event_log_info (hashcat_ctx, "* Filename..: %s", cache_generate->dictfile);
event_log_info (hashcat_ctx, "* Passwords.: %" PRIu64, cache_generate->cnt2);
event_log_info (hashcat_ctx, "* Bytes.....: %" PRId64, cache_generate->comp);
event_log_info (hashcat_ctx, "* Keyspace..: %" PRIu64, cache_generate->cnt);
event_log_info (hashcat_ctx, NULL);
}
}

View File

@ -1652,7 +1652,7 @@ char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int device_i
if (num_buslanes >= 0)
{
output_len += snprintf (output_buf + output_len, HCBUFSIZ_TINY - output_len, "Lanes:%d ", num_buslanes);
output_len += snprintf (output_buf + output_len, HCBUFSIZ_TINY - output_len, "Bus:%d ", num_buslanes);
}
if (output_len > 0)

View File

@ -720,28 +720,28 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
*/
event_log_info (hashcat_ctx,
"Session........: %s",
"Session..........: %s",
hashcat_status->session);
event_log_info (hashcat_ctx,
"Status.........: %s",
"Status...........: %s",
hashcat_status->status_string);
event_log_info (hashcat_ctx,
"Hash.Type......: %s",
"Hash.Type........: %s",
hashcat_status->hash_type);
event_log_info (hashcat_ctx,
"Hash.Target....: %s",
"Hash.Target......: %s",
hashcat_status->hash_target);
event_log_info (hashcat_ctx,
"Time.Started...: %s (%s)",
"Time.Started.....: %s (%s)",
hashcat_status->time_started_absolute,
hashcat_status->time_started_relative);
event_log_info (hashcat_ctx,
"Time.Estimated.: %s (%s)",
"Time.Estimated...: %s (%s)",
hashcat_status->time_estimated_absolute,
hashcat_status->time_estimated_relative);
@ -750,7 +750,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_STRAIGHT_FILE:
event_log_info (hashcat_ctx,
"Guess.Base.....: File (%s)",
"Guess.Base.......: File (%s)",
hashcat_status->guess_base);
break;
@ -758,11 +758,11 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_STRAIGHT_FILE_RULES_FILE:
event_log_info (hashcat_ctx,
"Guess.Base.....: File (%s)",
"Guess.Base.......: File (%s)",
hashcat_status->guess_base);
event_log_info (hashcat_ctx,
"Guess.Mod......: Rules (%s)",
"Guess.Mod........: Rules (%s)",
hashcat_status->guess_mod);
break;
@ -770,28 +770,28 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_STRAIGHT_FILE_RULES_GEN:
event_log_info (hashcat_ctx,
"Guess.Base.....: File (%s)",
"Guess.Base.......: File (%s)",
hashcat_status->guess_base);
event_log_info (hashcat_ctx,
"Guess.Mod......: Rules (Generated)");
"Guess.Mod........: Rules (Generated)");
break;
case GUESS_MODE_STRAIGHT_STDIN:
event_log_info (hashcat_ctx,
"Guess.Base.....: Pipe");
"Guess.Base.......: Pipe");
break;
case GUESS_MODE_STRAIGHT_STDIN_RULES_FILE:
event_log_info (hashcat_ctx,
"Guess.Base.....: Pipe");
"Guess.Base.......: Pipe");
event_log_info (hashcat_ctx,
"Guess.Mod......: Rules (%s)",
"Guess.Mod........: Rules (%s)",
hashcat_status->guess_mod);
break;
@ -799,21 +799,21 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_STRAIGHT_STDIN_RULES_GEN:
event_log_info (hashcat_ctx,
"Guess.Base.....: Pipe");
"Guess.Base.......: Pipe");
event_log_info (hashcat_ctx,
"Guess.Mod......: Rules (Generated)");
"Guess.Mod........: Rules (Generated)");
break;
case GUESS_MODE_COMBINATOR_BASE_LEFT:
event_log_info (hashcat_ctx,
"Guess.Base.....: File (%s), Left Side",
"Guess.Base.......: File (%s), Left Side",
hashcat_status->guess_base);
event_log_info (hashcat_ctx,
"Guess.Mod......: File (%s), Right Side",
"Guess.Mod........: File (%s), Right Side",
hashcat_status->guess_mod);
break;
@ -821,11 +821,11 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_COMBINATOR_BASE_RIGHT:
event_log_info (hashcat_ctx,
"Guess.Base.....: File (%s), Right Side",
"Guess.Base.......: File (%s), Right Side",
hashcat_status->guess_base);
event_log_info (hashcat_ctx,
"Guess.Mod......: File (%s), Left Side",
"Guess.Mod........: File (%s), Left Side",
hashcat_status->guess_mod);
break;
@ -833,7 +833,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_MASK:
event_log_info (hashcat_ctx,
"Guess.Mask.....: %s [%d]",
"Guess.Mask.......: %s [%d]",
hashcat_status->guess_base,
hashcat_status->guess_mask_length);
@ -842,12 +842,12 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_MASK_CS:
event_log_info (hashcat_ctx,
"Guess.Mask.....: %s [%d]",
"Guess.Mask.......: %s [%d]",
hashcat_status->guess_base,
hashcat_status->guess_mask_length);
event_log_info (hashcat_ctx,
"Guess.Charset..: %s ",
"Guess.Charset....: %s ",
hashcat_status->guess_charset);
break;
@ -855,11 +855,11 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_HYBRID1:
event_log_info (hashcat_ctx,
"Guess.Base.....: File (%s), Left Side",
"Guess.Base.......: File (%s), Left Side",
hashcat_status->guess_base);
event_log_info (hashcat_ctx,
"Guess.Mod......: Mask (%s) [%d], Right Side",
"Guess.Mod........: Mask (%s) [%d], Right Side",
hashcat_status->guess_mod,
hashcat_status->guess_mask_length);
@ -868,16 +868,16 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_HYBRID1_CS:
event_log_info (hashcat_ctx,
"Guess.Base.....: File (%s), Left Side",
"Guess.Base.......: File (%s), Left Side",
hashcat_status->guess_base);
event_log_info (hashcat_ctx,
"Guess.Mod......: Mask (%s) [%d], Right Side",
"Guess.Mod........: Mask (%s) [%d], Right Side",
hashcat_status->guess_mod,
hashcat_status->guess_mask_length);
event_log_info (hashcat_ctx,
"Guess.Charset..: %s",
"Guess.Charset....: %s",
hashcat_status->guess_charset);
break;
@ -885,11 +885,11 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_HYBRID2:
event_log_info (hashcat_ctx,
"Guess.Base.....: File (%s), Right Side",
"Guess.Base.......: File (%s), Right Side",
hashcat_status->guess_base);
event_log_info (hashcat_ctx,
"Guess.Mod......: Mask (%s) [%d], Left Side",
"Guess.Mod........: Mask (%s) [%d], Left Side",
hashcat_status->guess_mod,
hashcat_status->guess_mask_length);
@ -898,16 +898,16 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_HYBRID2_CS:
event_log_info (hashcat_ctx,
"Guess.Base.....: File (%s), Right Side",
"Guess.Base.......: File (%s), Right Side",
hashcat_status->guess_base);
event_log_info (hashcat_ctx,
"Guess.Mod......: Mask (%s) [%d], Left Side",
"Guess.Mod........: Mask (%s) [%d], Left Side",
hashcat_status->guess_mod,
hashcat_status->guess_mask_length);
event_log_info (hashcat_ctx,
"Guess.Charset..: %s",
"Guess.Charset....: %s",
hashcat_status->guess_charset);
break;
@ -918,7 +918,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_STRAIGHT_FILE:
event_log_info (hashcat_ctx,
"Guess.Queue....: %d/%d (%.02f%%)",
"Guess.Queue......: %d/%d (%.02f%%)",
hashcat_status->guess_base_offset,
hashcat_status->guess_base_count,
hashcat_status->guess_base_percent);
@ -928,7 +928,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_STRAIGHT_FILE_RULES_FILE:
event_log_info (hashcat_ctx,
"Guess.Queue....: %d/%d (%.02f%%)",
"Guess.Queue......: %d/%d (%.02f%%)",
hashcat_status->guess_base_offset,
hashcat_status->guess_base_count,
hashcat_status->guess_base_percent);
@ -938,7 +938,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_STRAIGHT_FILE_RULES_GEN:
event_log_info (hashcat_ctx,
"Guess.Queue....: %d/%d (%.02f%%)",
"Guess.Queue......: %d/%d (%.02f%%)",
hashcat_status->guess_base_offset,
hashcat_status->guess_base_count,
hashcat_status->guess_base_percent);
@ -948,7 +948,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_MASK:
event_log_info (hashcat_ctx,
"Guess.Queue....: %d/%d (%.02f%%)",
"Guess.Queue......: %d/%d (%.02f%%)",
hashcat_status->guess_base_offset,
hashcat_status->guess_base_count,
hashcat_status->guess_base_percent);
@ -958,7 +958,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_MASK_CS:
event_log_info (hashcat_ctx,
"Guess.Queue....: %d/%d (%.02f%%)",
"Guess.Queue......: %d/%d (%.02f%%)",
hashcat_status->guess_base_offset,
hashcat_status->guess_base_count,
hashcat_status->guess_base_percent);
@ -968,13 +968,13 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_HYBRID1:
event_log_info (hashcat_ctx,
"Guess.Queue.Base: %d/%d (%.02f%%)",
"Guess.Queue.Base.: %d/%d (%.02f%%)",
hashcat_status->guess_base_offset,
hashcat_status->guess_base_count,
hashcat_status->guess_base_percent);
event_log_info (hashcat_ctx,
"Guess.Queue.Mod: %d/%d (%.02f%%)",
"Guess.Queue.Mod..: %d/%d (%.02f%%)",
hashcat_status->guess_mod_offset,
hashcat_status->guess_mod_count,
hashcat_status->guess_mod_percent);
@ -984,13 +984,13 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case GUESS_MODE_HYBRID2:
event_log_info (hashcat_ctx,
"Guess.Queue.Base: %d/%d (%.02f%%)",
"Guess.Queue.Base.: %d/%d (%.02f%%)",
hashcat_status->guess_base_offset,
hashcat_status->guess_base_count,
hashcat_status->guess_base_percent);
event_log_info (hashcat_ctx,
"Guess.Queue.Mod: %d/%d (%.02f%%)",
"Guess.Queue.Mod..: %d/%d (%.02f%%)",
hashcat_status->guess_mod_offset,
hashcat_status->guess_mod_count,
hashcat_status->guess_mod_percent);
@ -1005,7 +1005,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
if (device_info->skipped_dev == true) continue;
event_log_info (hashcat_ctx,
"Speed.Dev.#%d...: %9sH/s (%0.2fms)", device_id + 1,
"Speed.Dev.#%d.....: %9sH/s (%0.2fms)", device_id + 1,
device_info->speed_sec_dev,
device_info->exec_msec_dev);
}
@ -1013,12 +1013,12 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
if (hashcat_status->device_info_active > 1)
{
event_log_info (hashcat_ctx,
"Speed.Dev.#*...: %9sH/s",
"Speed.Dev.#*.....: %9sH/s",
hashcat_status->speed_sec_all);
}
event_log_info (hashcat_ctx,
"Recovered......: %d/%d (%.2f%%) Digests, %d/%d (%.2f%%) Salts",
"Recovered........: %d/%d (%.2f%%) Digests, %d/%d (%.2f%%) Salts",
hashcat_status->digests_done,
hashcat_status->digests_cnt,
hashcat_status->digests_percent,
@ -1029,7 +1029,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
if (hashcat_status->digests_cnt > 1000)
{
event_log_info (hashcat_ctx,
"Recovered/Time.: %s",
"Recovered/Time...: %s",
hashcat_status->cpt);
}
@ -1038,19 +1038,19 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case PROGRESS_MODE_KEYSPACE_KNOWN:
event_log_info (hashcat_ctx,
"Progress.......: %" PRIu64 "/%" PRIu64 " (%.02f%%)",
"Progress.........: %" PRIu64 "/%" PRIu64 " (%.02f%%)",
hashcat_status->progress_cur_relative_skip,
hashcat_status->progress_end_relative_skip,
hashcat_status->progress_finished_percent);
event_log_info (hashcat_ctx,
"Rejected.......: %" PRIu64 "/%" PRIu64 " (%.02f%%)",
"Rejected.........: %" PRIu64 "/%" PRIu64 " (%.02f%%)",
hashcat_status->progress_rejected,
hashcat_status->progress_cur_relative_skip,
hashcat_status->progress_rejected_percent);
event_log_info (hashcat_ctx,
"Restore.Point..: %" PRIu64 "/%" PRIu64 " (%.02f%%)",
"Restore.Point....: %" PRIu64 "/%" PRIu64 " (%.02f%%)",
hashcat_status->restore_point,
hashcat_status->restore_total,
hashcat_status->restore_percent);
@ -1060,15 +1060,15 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
case PROGRESS_MODE_KEYSPACE_UNKNOWN:
event_log_info (hashcat_ctx,
"Progress.......: %" PRIu64,
"Progress.........: %" PRIu64,
hashcat_status->progress_cur_relative_skip);
event_log_info (hashcat_ctx,
"Rejected.......: %" PRIu64,
"Rejected.........: %" PRIu64,
hashcat_status->progress_rejected);
event_log_info (hashcat_ctx,
"Restore.Point..: %" PRIu64,
"Restore.Point....: %" PRIu64,
hashcat_status->restore_point);
break;
@ -1083,7 +1083,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
if (device_info->guess_candidates_dev == NULL) continue;
event_log_info (hashcat_ctx,
"Candidates.#%d..: %s", device_id + 1,
"Candidates.#%d....: %s", device_id + 1,
device_info->guess_candidates_dev);
}
@ -1098,7 +1098,7 @@ void status_display (hashcat_ctx_t *hashcat_ctx)
if (device_info->hwmon_dev == NULL) continue;
event_log_info (hashcat_ctx,
"HWMon.Dev.#%d...: %s", device_id + 1,
"HWMon.Dev.#%d.....: %s", device_id + 1,
device_info->hwmon_dev);
}
}
@ -1164,7 +1164,7 @@ void status_benchmark (hashcat_ctx_t *hashcat_ctx)
if (device_info->skipped_dev == true) continue;
event_log_info (hashcat_ctx,
"Speed.Dev.#%d...: %9sH/s (%0.2fms)", device_id + 1,
"Speed.Dev.#%d.....: %9sH/s (%0.2fms)", device_id + 1,
device_info->speed_sec_dev,
device_info->exec_msec_dev);
}
@ -1172,7 +1172,7 @@ void status_benchmark (hashcat_ctx_t *hashcat_ctx)
if (hashcat_status->device_info_active > 1)
{
event_log_info (hashcat_ctx,
"Speed.Dev.#*...: %9sH/s",
"Speed.Dev.#*.....: %9sH/s",
hashcat_status->speed_sec_all);
}
@ -1233,7 +1233,7 @@ void status_speed (hashcat_ctx_t *hashcat_ctx)
if (device_info->skipped_dev == true) continue;
event_log_info (hashcat_ctx,
"Speed.Dev.#%d...: %9sH/s (%0.2fms)", device_id + 1,
"Speed.Dev.#%d.....: %9sH/s (%0.2fms)", device_id + 1,
device_info->speed_sec_dev,
device_info->exec_msec_dev);
}
@ -1241,7 +1241,7 @@ void status_speed (hashcat_ctx_t *hashcat_ctx)
if (hashcat_status->device_info_active > 1)
{
event_log_info (hashcat_ctx,
"Speed.Dev.#*...: %9sH/s",
"Speed.Dev.#*.....: %9sH/s",
hashcat_status->speed_sec_all);
}
@ -1302,7 +1302,7 @@ void status_progress (hashcat_ctx_t *hashcat_ctx)
if (device_info->skipped_dev == true) continue;
event_log_info (hashcat_ctx,
"Progress.Dev.#%d: %d", device_id + 1,
"Progress.Dev.#%d..: %d", device_id + 1,
device_info->progress_dev);
}
@ -1313,7 +1313,7 @@ void status_progress (hashcat_ctx_t *hashcat_ctx)
if (device_info->skipped_dev == true) continue;
event_log_info (hashcat_ctx,
"Runtime.Dev.#%d.: %0.2fms", device_id + 1,
"Runtime.Dev.#%d...: %0.2fms", device_id + 1,
device_info->runtime_msec_dev);
}