Merge pull request #460 from philsmd/master

new feature: allow -o to be used in stdout mode
This commit is contained in:
Jens Steube
2016-08-18 11:52:31 +02:00
committed by GitHub
2 changed files with 24 additions and 1 deletions
+1
View File
@@ -22,6 +22,7 @@
- Replace RegGetValue() with RegQueryValueEx() to enable Windows XP 32 bit compatibility
- Slightly increased NVidias rule-processing performance by using generic instructions instead of byte_perm()
- Add support for @ rule (RULE_OP_MANGLE_PURGECHAR) to use on GPU
- Add support for --outfile (short -o) to be used together with --stdout
##
## Bugs
+23 -1
View File
@@ -2544,7 +2544,22 @@ static void process_stdout (hc_device_param_t *device_param, const uint pws_cnt)
{
out_t out;
out.fp = stdout;
out.fp = stdout;
if (data.outfile != NULL)
{
if ((out.fp = fopen (data.outfile, "ab")) != NULL)
{
lock_file (out.fp);
}
else
{
log_error ("ERROR: %s: %s", data.outfile, strerror (errno));
out.fp = stdout;
}
}
out.len = 0;
uint plain_buf[16] = { 0 };
@@ -2712,6 +2727,13 @@ static void process_stdout (hc_device_param_t *device_param, const uint pws_cnt)
}
out_flush (&out);
if (out.fp != stdout)
{
unlock_file (out.fp);
fclose (out.fp);
}
}
static void save_hash ()