|
|
|
@ -108,16 +108,15 @@ static void main_log (hashcat_ctx_t *hashcat_ctx, HCFILE *fp, const int loglevel
|
|
|
|
|
switch (loglevel)
|
|
|
|
|
{
|
|
|
|
|
case LOGLEVEL_INFO: break;
|
|
|
|
|
case LOGLEVEL_WARNING: hc_fwrite_compress ("\033[33m", 5, 1, fp); break;
|
|
|
|
|
case LOGLEVEL_ERROR: hc_fwrite_compress ("\033[31m", 5, 1, fp); break;
|
|
|
|
|
case LOGLEVEL_ADVICE: hc_fwrite_compress ("\033[33m", 5, 1, fp); break;
|
|
|
|
|
case LOGLEVEL_WARNING: hc_fwrite ("\033[33m", 5, 1, fp); break;
|
|
|
|
|
case LOGLEVEL_ERROR: hc_fwrite ("\033[31m", 5, 1, fp); break;
|
|
|
|
|
case LOGLEVEL_ADVICE: hc_fwrite ("\033[33m", 5, 1, fp); break;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// finally, print
|
|
|
|
|
|
|
|
|
|
// hc_fwrite (msg_buf, msg_len, 1, fp);
|
|
|
|
|
hc_fwrite_compress ((void *)msg_buf, msg_len, 1, fp);
|
|
|
|
|
hc_fwrite ((void *)msg_buf, msg_len, 1, fp);
|
|
|
|
|
|
|
|
|
|
// color stuff post
|
|
|
|
|
|
|
|
|
@ -133,9 +132,9 @@ static void main_log (hashcat_ctx_t *hashcat_ctx, HCFILE *fp, const int loglevel
|
|
|
|
|
switch (loglevel)
|
|
|
|
|
{
|
|
|
|
|
case LOGLEVEL_INFO: break;
|
|
|
|
|
case LOGLEVEL_WARNING: hc_fwrite_compress ("\033[0m", 4, 1, fp); break;
|
|
|
|
|
case LOGLEVEL_ERROR: hc_fwrite_compress ("\033[0m", 4, 1, fp); break;
|
|
|
|
|
case LOGLEVEL_ADVICE: hc_fwrite_compress ("\033[0m", 4, 1, fp); break;
|
|
|
|
|
case LOGLEVEL_WARNING: hc_fwrite ("\033[0m", 4, 1, fp); break;
|
|
|
|
|
case LOGLEVEL_ERROR: hc_fwrite ("\033[0m", 4, 1, fp); break;
|
|
|
|
|
case LOGLEVEL_ADVICE: hc_fwrite ("\033[0m", 4, 1, fp); break;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@ -143,15 +142,13 @@ static void main_log (hashcat_ctx_t *hashcat_ctx, HCFILE *fp, const int loglevel
|
|
|
|
|
|
|
|
|
|
if (msg_newline == true)
|
|
|
|
|
{
|
|
|
|
|
// hc_fwrite (EOL, strlen (EOL), 1, fp);
|
|
|
|
|
hc_fwrite_compress (EOL, strlen (EOL), 1, fp);
|
|
|
|
|
hc_fwrite (EOL, strlen (EOL), 1, fp);
|
|
|
|
|
|
|
|
|
|
// on error, add another newline
|
|
|
|
|
|
|
|
|
|
if (loglevel == LOGLEVEL_ERROR)
|
|
|
|
|
{
|
|
|
|
|
// hc_fwrite (EOL, strlen (EOL), 1, fp);
|
|
|
|
|
hc_fwrite_compress (EOL, strlen (EOL), 1, fp);
|
|
|
|
|
hc_fwrite (EOL, strlen (EOL), 1, fp);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -371,8 +368,8 @@ static void main_cracker_hash_cracked (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx,
|
|
|
|
|
if (outfile_ctx->filename == NULL) if (user_options->quiet == false) clear_prompt (hashcat_ctx);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hc_fwrite (buf, len, 1, stdout);
|
|
|
|
|
hc_fwrite (EOL, strlen (EOL), 1, stdout);
|
|
|
|
|
fwrite (buf, len, 1, stdout);
|
|
|
|
|
fwrite (EOL, strlen (EOL), 1, stdout);
|
|
|
|
|
|
|
|
|
|
if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK))
|
|
|
|
|
{
|
|
|
|
@ -417,8 +414,8 @@ static void main_potfile_hash_show (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAY
|
|
|
|
|
|
|
|
|
|
if (outfile_ctx->fp != NULL) return; // cracked hash was not written to an outfile
|
|
|
|
|
|
|
|
|
|
hc_fwrite (buf, len, 1, stdout);
|
|
|
|
|
hc_fwrite (EOL, strlen (EOL), 1, stdout);
|
|
|
|
|
fwrite (buf, len, 1, stdout);
|
|
|
|
|
fwrite (EOL, strlen (EOL), 1, stdout);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void main_potfile_hash_left (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len)
|
|
|
|
@ -427,8 +424,8 @@ static void main_potfile_hash_left (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAY
|
|
|
|
|
|
|
|
|
|
if (outfile_ctx->fp != NULL) return; // cracked hash was not written to an outfile
|
|
|
|
|
|
|
|
|
|
hc_fwrite (buf, len, 1, stdout);
|
|
|
|
|
hc_fwrite (EOL, strlen (EOL), 1, stdout);
|
|
|
|
|
fwrite (buf, len, 1, stdout);
|
|
|
|
|
fwrite (EOL, strlen (EOL), 1, stdout);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void main_potfile_num_cracked (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const void *buf, MAYBE_UNUSED const size_t len)
|
|
|
|
|