-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
…ed to not error(), but to print a warning and ignore the hashes. error() call in valid is a bad-thing (tm) to do, especially exiting when no format specified, when jtr is searching for proper format to match the hash
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,8 +153,15 @@ static int our_valid(char *ciphertext, struct fmt_main *self) | |
return pDynamic->methods.valid(ciphertext, pDynamic); | ||
|
||
if (options.input_enc == UTF_8 && !valid_utf8((UTF8*)ciphertext)) { | ||
fprintf(stderr, "%s: Input file is not UTF-8. Please use --input-enc to specify a codepage.\n", self->params.label); | ||
error(); | ||
static int error_shown = 0; | ||
#ifdef HAVE_FUZZ | ||
if (options.flags & (FLG_FUZZ_CHK || options.flags & FLG_FUZZ_DUMP_CHK)) | ||
return 0; | ||
#endif | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
frank-dittrich
Collaborator
|
||
if (!error_shown) | ||
fprintf(stderr, "%s: Input file is not UTF-8. Please use --input-enc to specify a codepage.\n", self->params.label); | ||
error_shown = 1; | ||
This comment has been minimized.
Sorry, something went wrong.
frank-dittrich
Collaborator
|
||
return 0; | ||
} | ||
if (strncmp(ciphertext, FORMAT_TAG, FORMAT_TAG_LEN) != 0) | ||
return 0; | ||
|
Are you sure that
#ifdef HAVE_FUZZ
...#endif' block is still needed? valid() returning 0 should be OK even when using
./john --fuzz`.