mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #1152] --list problem #718
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#718
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/1152
This is not a segfault bug. But I think there is problem with --list.
#1. Prepare
1.1 content of 7z_fmt
$7z$0$19$0$1122$8$d1f50227759415890000000000000000$1412385885$112$112$5e5b8b734adf52a64c541a5a5369023d7cccb78bd910c0092535dfb013a5df84ac692c5311d2e7bbdc580f5b867f7b5dd43830f7b4f37e41c7277e228fb92a6dd854a31646ad117654182253706dae0c069d3f4ce46121d52b6f20741a0bb39fc61113ce14d22f9184adafd6b5333fb1
1.2 compile
$ ./configure && make -sj8
#2. Run
#2.1 no --list
$ ./john 7z_fmt
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.2 with --list
$ ./john 7z_fmt --list=inc-modes
Loaded 1 password hash (7z, 7-Zip [SHA256 AES 32/64])
Will run 8 OpenMP threads
digits
upper
lower
lowerspace
uppernum
lowernum
alpha
alnum
alnumspace
lanman
lm_ascii
ascii
latin1
utf8
custom
#3. Problem
3.1 Why still print message: "Loaded 1 password hash (7z, 7-Zip [SHA256 AES 32/64])" in 2.2 with --list?
3.2 I think "--list" can not combine with others parameters. John should report error message: "Invalid options combination or duplicate option: "--list=inc-modes" in 2.2 with --list.
@magnumripper commented on GitHub (Mar 26, 2015):
The --list commands are somewhat liberated in syntax on purpose, in order for bash completion (which is one of their main reason to exist) to be simpler. I'm not sure it's really necessary though. @frank-dittrich what do you think?
@frank-dittrich commented on GitHub (Mar 26, 2015):
Yes, for bash completion of
I use
--list=inc-modesin the bash completion script.I cannot just run
./john --list=inc-modesto find the possible completions, because that list depends on other command line options like--config=.So, I kept all the command line options.
Because we ran into problems with this approach, the following commit dropped file names from the command line:
This works, because john doesn't support file names starting with
'-', anyway:In this case,
-hashes.pomelois a file name../john --list=inc-modes -- -hashes.pomelofails as well, but in this case, the script uses a fallback of just calling./john --list=inc-modesto get the list of possible completions.So, bash completion no longer needs that "liberated syntax".
We could either just avoid loading hashes if
--listis used, or we could write something to stderr and exit.Just in case Solar intends to fix the "file names starting with '-'" issue, we might need to adjust the "Drop any input files from the command" logic.
@loverszhaokai commented on GitHub (Mar 26, 2015):
@frank-dittrich Thanks. I get it.