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.41k stars 2.11k forks source link

Missing last CR in --list=formats with @ format-class #4371

Closed magnumripper closed 4 years ago

magnumripper commented 4 years ago

* is a wildcard for the format label (eg. office) # is a wildcard for the format name (eg. 2007/2010/2013 @ is a wildcard for the algorithm name (eg. SHA1 256/256 AVX2 8x / SHA512 256/256 AVX2 4x AES)

These are fine:

$ ../run/john --list=formats --format=raw*
Raw-SHA512, Raw-Blake2, Raw-Keccak, Raw-Keccak-256, Raw-MD4, Raw-MD5, 
Raw-MD5u, Raw-SHA1, Raw-SHA1-AxCrypt, Raw-SHA1-Linkedin, Raw-SHA224, 
Raw-SHA256, Raw-SHA3, Raw-SHA384, raw-MD4-opencl, raw-MD5-opencl, 
raw-SHA1-opencl, raw-SHA256-opencl, raw-SHA512-free-opencl, 
raw-SHA512-opencl
$ ../run/john --list=formats --format=#ipmi
RAKP

This isn't:

$ ../run/john --list=formats --format=@md5
md5crypt, md5crypt-long, chap, dahua, dmd5, eigrp, hdaa, hsrp, IKE, ipb2, 
krb5asrep, krb5tgs, money, MongoDB, MSCHAPv2, multibit, net-ah, netlmv2, 
net-md5, netntlmv2, netntlm, netntlm-naive, nk, md5ns, o10glogon, oldoffice, 
Palshop, PBKDF2-HMAC-MD5, PDF, po, postgres, radius, RAdmin, Raw-MD5, 
Raw-MD5u, rsvp, sapb, SIP, skey, SNMP, sspr, SunMD5, tacacs-plus, tcp-md5, 
vtp, wpapsk-pmk, ZipMonster, HMAC-MD5, dynamic_n, $       <--- PROMPT IS HERE

Last CR missing, can't understand why. Haven't looked into it yet at all though - probably as trivial bug as it ever gets.

magnumripper commented 4 years ago

It seems to only happen when dynamic_n is the last format (it usually is)

$ ../run/john --list=formats --format=@MD5/
eigrp, IKE, money, multibit, oldoffice, skey, sspr, wpapsk-pmk

$ ../run/john --list=formats --format=@MD5 
md5crypt, md5crypt-long, chap, dahua, dmd5, eigrp, hdaa, hsrp, IKE, ipb2, 
krb5asrep, krb5tgs, money, MongoDB, MSCHAPv2, multibit, net-ah, netlmv2, 
net-md5, netntlmv2, netntlm, netntlm-naive, nk, md5ns, o10glogon, oldoffice, 
Palshop, PBKDF2-HMAC-MD5, PDF, po, postgres, radius, RAdmin, Raw-MD5, 
Raw-MD5u, rsvp, sapb, SIP, skey, SNMP, sspr, SunMD5, tacacs-plus, tcp-md5, 
vtp, wpapsk-pmk, ZipMonster, HMAC-MD5, dynamic_n, $                  <--- PROMPT HERE

$ ../run/john --list=formats --format=@MD5/SHA1
IKE, money, oldoffice, skey, sspr

$ ../run/john --list=formats --format=@SHA1
AndroidBackup, agilekeychain, aix-ssha1, AxCrypt, BestCrypt, BKS, WoWSRP, 
Blockchain, sha1crypt, Citrix_NS10, dashlane, dmg, DPAPImk, EncFS, enpass, 
EPI, EPiServer, fde, Fortigate, IKE, itunes-backup, iwork, keychain, 
keystore, known_hosts, krb5asrep, krb5pa-sha1, krb5-17, krb5-18, krb5-3, 
kwallet, LUKS, money, scram, Mozilla, mscash2, mssql, mssql05, mysqlna, 
mysql-sha1, net-sha1, nk, o3logon, o5logon, ODF, Office, oldoffice, 
OpenBSD-SoftRAID, oracle11, Palshop, PBKDF2-HMAC-SHA1, PEM, pfx, pgpdisk, 
pgpsda, pgpwde, PuTTY, RAKP, rar, Raw-SHA1, Raw-SHA1-AxCrypt, 
Raw-SHA1-Linkedin, Siemens-S7, Salted-SHA1, sapg, sappse, securezip, Signal, 
skey, SL3, SNMP, solarwinds, sspr, STRIP, telegram, vmx, wbb3, wpapsk, 
xmpp-scram, xsha, zed, ZIP, HMAC-SHA1, dynamic_n, $                  <--- PROMPT HERE
magnumripper commented 4 years ago

I'm on to this as a side-effect of #4366