Skip to content

listconf.c: Optimize format list output (--list=formats) for pipes#6007

Open
magnumripper wants to merge 1 commit into
openwall:bleeding-jumbofrom
magnumripper:formatlist-comma
Open

listconf.c: Optimize format list output (--list=formats) for pipes#6007
magnumripper wants to merge 1 commit into
openwall:bleeding-jumbofrom
magnumripper:formatlist-comma

Conversation

@magnumripper

Copy link
Copy Markdown
Member

When scripting or writing "oneliners" the commas are just in the way and requires special handling. We now skip them and list one format per line if output is not a terminal.

$ ../run/john -list=formats -form=*crypt
descrypt, bsdicrypt, md5crypt, bcrypt, scrypt, adxcrypt, AxCrypt, BestCrypt, 
sha1crypt, sha256crypt, sha512crypt, django-scrypt, streebog256crypt, 
streebog512crypt, gost94crypt, Raw-SHA1-AxCrypt, sm3crypt, crypt
18 formats
$ ../run/john -list=formats -form=*crypt | wc -l
      18
$ ../run/john -list=formats -form=*crypt | grep ^sha
sha1crypt
sha256crypt
sha512crypt

When scripting or writing "oneliners" the commas are just in the way and
requires special handling.  We now skip them and list one format per line
if output is not a terminal.
@magnumripper magnumripper requested a review from solardiz July 7, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant