1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-03-06 18:16:12 +00:00

bugfix: prevent crashing when building on win

This commit is contained in:
banderlog 2025-01-18 03:26:25 +02:00
parent c1459cd2d6
commit 4e6077ad5c

View File

@ -352,11 +352,16 @@ 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); if (outfile_ctx->filename == NULL) if (user_options->quiet == false) clear_prompt (hashcat_ctx);
} }
// cyan color for cracked hashes #if defined (_WIN)
fwrite (buf, len, 1, stdout);
fwrite (EOL, strlen (EOL), 1, stdout);
#else
// color option for cracked hashes on non win
if (user_options->color == true) fputs("\033[0;36m", stdout); if (user_options->color == true) fputs("\033[0;36m", stdout);
fwrite (buf, len, 1, stdout); fwrite (buf, len, 1, stdout);
if (user_options->color == true) fwrite("\033[0m", 4, 1, stdout); if (user_options->color == true) fwrite("\033[0m", 4, 1, stdout);
fwrite (EOL, strlen (EOL), 1, stdout); fwrite (EOL, strlen (EOL), 1, stdout);
#endif
if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK)) if ((user_options_extra->wordlist_mode == WL_MODE_FILE) || (user_options_extra->wordlist_mode == WL_MODE_MASK))
{ {