mirror of
https://github.com/hashcat/hashcat.git
synced 2025-02-17 01:52:06 +00:00
Fix more EOL issues
This commit is contained in:
parent
97b58b16af
commit
c4ba7907ca
@ -287,8 +287,8 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
|
||||
printf
|
||||
(
|
||||
"- Device #%u: autotuned kernel-accel to %u\n"
|
||||
"- Device #%u: autotuned kernel-loops to %u\n",
|
||||
"- Device #%u: autotuned kernel-accel to %u" EOL
|
||||
"- Device #%u: autotuned kernel-loops to %u" EOL,
|
||||
device_param->device_id + 1, kernel_accel,
|
||||
device_param->device_id + 1, kernel_loops
|
||||
);
|
||||
|
@ -75,7 +75,7 @@ void debugfile_write_append (hashcat_ctx_t *hashcat_ctx, const u8 *rule_buf, con
|
||||
debugfile_format_plain (hashcat_ctx, mod_plain_ptr, mod_plain_len);
|
||||
}
|
||||
|
||||
fputc ('\n', debugfile_ctx->fp);
|
||||
fwrite (EOL, strlen (EOL), 1, debugfile_ctx->fp);
|
||||
}
|
||||
|
||||
int debugfile_init (hashcat_ctx_t *hashcat_ctx)
|
||||
|
@ -174,9 +174,7 @@ int save_hash (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
ascii_digest (hashcat_ctx, out_buf, salt_pos, digest_pos);
|
||||
|
||||
fputs (out_buf, fp);
|
||||
|
||||
fputc ('\n', fp);
|
||||
fprintf (fp, "%s" EOL, out_buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ void logfile_append (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)
|
||||
|
||||
va_end (ap);
|
||||
|
||||
fputc ('\n', fp);
|
||||
fwrite (EOL, strlen (EOL), 1, fp);
|
||||
|
||||
fflush (fp);
|
||||
|
||||
|
@ -146,7 +146,7 @@ void loopback_write_append (hashcat_ctx_t *hashcat_ctx, const u8 *plain_ptr, con
|
||||
|
||||
loopback_format_plain (hashcat_ctx, plain_ptr, plain_len);
|
||||
|
||||
fputc ('\n', fp);
|
||||
fwrite (EOL, strlen (EOL), 1, fp);
|
||||
|
||||
fflush (fp);
|
||||
}
|
||||
|
@ -866,11 +866,11 @@ static void sp_tbl_to_css (hcstat_table_t *root_table_buf, hcstat_table_t *marko
|
||||
{
|
||||
cs_t *ptr = &markov_css_buf[(i * CHARSIZ) + j];
|
||||
|
||||
printf ("pos:%u key:%u len:%u\n", i, j, ptr->cs_len);
|
||||
printf ("pos:%u key:%u len:%u" EOL, i, j, ptr->cs_len);
|
||||
|
||||
for (u32 k = 0; k < 10; k++)
|
||||
{
|
||||
printf (" %u\n", ptr->cs_buf[k]);
|
||||
printf (" %u" EOL, ptr->cs_buf[k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -299,9 +299,7 @@ void potfile_write_append (hashcat_ctx_t *hashcat_ctx, const char *out_buf, u8 *
|
||||
|
||||
tmp_buf[tmp_len] = 0;
|
||||
|
||||
fprintf (potfile_ctx->fp, "%s\n", tmp_buf);
|
||||
|
||||
fflush (potfile_ctx->fp);
|
||||
fprintf (potfile_ctx->fp, "%s" EOL, tmp_buf);
|
||||
}
|
||||
|
||||
int potfile_remove_parse (hashcat_ctx_t *hashcat_ctx)
|
||||
|
11
src/stdout.c
11
src/stdout.c
@ -25,10 +25,21 @@ static void out_push (out_t *out, const u8 *pw_buf, const int pw_len)
|
||||
|
||||
memcpy (ptr, pw_buf, pw_len);
|
||||
|
||||
#if defined (_POSIX)
|
||||
|
||||
ptr[pw_len] = '\n';
|
||||
|
||||
out->len += pw_len + 1;
|
||||
|
||||
#else
|
||||
|
||||
ptr[pw_len + 0] = '\r';
|
||||
ptr[pw_len + 1] = '\n';
|
||||
|
||||
out->len += pw_len + 2;
|
||||
|
||||
#endif
|
||||
|
||||
if (out->len >= BUFSIZ - 100)
|
||||
{
|
||||
out_flush (out);
|
||||
|
Loading…
Reference in New Issue
Block a user