openwall / john

John the Ripper jumbo - advanced offline password cracker, which supports hundreds of hash and cipher types, and runs on many operating systems, CPUs, GPUs, and even some FPGAs
https://www.openwall.com/john/
Other
10.29k stars 2.1k forks source link

Remove LENGTH from --markov mode documentation... #1651

Closed frank-dittrich closed 8 years ago

frank-dittrich commented 9 years ago

doc/MARKOV

--markov[:LEVEL[:START[:END[:LENGTH]]]]
--markov=MODE[:LEVEL[:START[:END[:LENGTH]]]]
...
* LENGTH determines the length of passwords generated. If LENGTH is 0 or not
specified on the command line, the LENGTH interval is read from config
variables in the [Markov:mode] section, or [Markov:Default] section. The
-min-length and -max-length options deprecate the LENGTH parameter (and
over-rides it).

run/john.conf:

# MkvLvl and MkvMaxLen should also be specified here, as a fallback for
# --markov usage without specifying LEVEL and/or LENGTH on the command line
MkvLvl = 200
MkvMaxLen = 12
# MkvMinLvl and MkvMinLen should not be specified at all in [Markov:Default],
# or they should be equal to 0 (which is the default if not specified.
# MkvMinLvl and MkvMinLen can be used in other Markov mode sections
# except [Markov:Default]
; MkvMinLvl = 0
; MkvMinLen = 0

bash completion:

$ ./john --markov=[tab][tab]
LEVEL[:START[:END[:LENGTH]]]
MODE
MODE:LEVEL[:START[:END[:LENGTH]]]
cmiyc
cmiyc-digits
default
sha512

Mention --max-length and --min-length instead.

frank-dittrich commented 8 years ago

@magnum: bash completion also knew about LENGTH.

$ ./john --markov=[tab][tab]
LEVEL[:START[:END[:LENGTH]]]       MODE:LEVEL[:START[:END[:LENGTH]]]
MODE                               default

I think, instead of just dropping [:LENGTH] here, MODE, LEVEL[:START[:END[:LENGTH]]], and MODE:LEVEL[:START[:END[:LENGTH]]] should be dropped completely, and just the list of markov modes should be used for bash completion.

frank-dittrich commented 8 years ago

My bad. I wasn't using latest john.bash_completion, but some older version from another directory. Latest bash completion doesn't mention LENGTH, but we might want to ignore anything but markov mode names.

magnumripper commented 8 years ago

For still being able to get a "usage reminder" I propose we keep the current behavior for -markov[tab][tab] but change to just listing the modes with -markov=[tab][tab] (with an equal sign).

Either that, or keep it as-is.