mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1157] --input-encoding problem #722
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#722
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @loverszhaokai on GitHub (Mar 26, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1157
#1. Compare the two cases
Both Case 1 and Case 2 are invalid.
1.1 Case 1
$ ./john 7z_fmt --input-encoding=11
Invalid encoding. Supported encodings:
ASCII, UTF-8, ISO-8859-1 (or latin1), ISO-8859-2, ISO-8859-7, ISO-8859-15, KOI8-R,
CP437, CP720, CP737, CP850, CP852, CP858, CP866, CP868,
CP1250, CP1251, CP1252, CP1253, CP1254, CP1255, CP1256
1.2 Case 2
$ ./john 7z_fmt --input-encoding=11111111111111111111111111111111111
Loaded 1 password hash (7z, 7-Zip [SHA256 AES 32/64])
Will run 8 OpenMP threads
Note: This format may emit false positives, so it will keep trying even after
finding a possible candidate.
Press 'q' or Ctrl-C to abort, almost any other key for status
password (?)
#2. Debug
I think john should report error message and exit in Case 2.
2.1 unicode::cp_name2id()
Location: unicode.c int cp_name2id(char *encoding)
16 == sizeof(enc), so the cp_name2id() will return CP_UNDEF for long encoding in Case 2.
Why not print error message?
@magnumripper commented on GitHub (Mar 26, 2015):
That is a good question... Does "git blame" shed some light on it?
@loverszhaokai commented on GitHub (Mar 26, 2015):
@magnumripper
github.com/magnumripper/JohnTheRipper@e19a0c7cf3This commit add the function: cp_name2id.
@magnumripper commented on GitHub (Mar 26, 2015):
Yeah, we should probably bail out the same way as we do in case 1.
@loverszhaokai commented on GitHub (Mar 26, 2015):
@magnumripper OK, I will fix this bug and test again. Thanks.