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.01k stars 2.07k forks source link

pass_gen.pl has confusing stubs in place for loads of formats. #1132

Closed magnumripper closed 9 years ago

magnumripper commented 9 years ago

Having stubs in there is one thing, but pass_gen.pl should definitely not list such formats as being supported. This must be fixed.

Found after seeing GPG was supported, then just getting empty output.

jfoug commented 9 years ago

Just put an output string such as "format under construction"

magnumripper commented 9 years ago

No, they need to go away from the list of supported formats.

magnumripper commented 9 years ago
    HashType is one or more (space separated) from the following list:
       afs agilekeychain aix-ssha1 aix-ssha256 aix-ssha512 bb-es10 BCRYPT 
       BCRYPTx BFegg BigCrypt bitcoin blockchain BSDIcrypt chap cisco4 cisco8 
       cisco9 citrix-ns10 clipperz-srp cloudkeychain cq crc_32 dahua DESCrypt 
       django django-scrypt dmg dominosec dragonfly3-32 dragonfly3-64 
       dragonfly4-32 dragonfly4-64 drupal7 dummy Dynamic dynamic_27 dynamic_28 
       ecryptfs efs eigrp encfs epi episerver_sha1 episerver_sha256 fde 
       formspring fortigate gpg haval-128 Haval-256 hdaa hmac-MD5 hmac-sha1 
       hmac-sha224 hmac-sha256 hmac-sha384 hmac-sha512 hmailserver hsrp ike 
       IPB2 keepass keychain keyring keystore known-hosts krb4 krb5 krb5-18 
       krb5pa-md5 krb5pa-sha1 kwallet l0phtcrack lastpass LM lp luks MD4p MD4s 
       md5crypt md5crypt-smd5 md5crypt_a mdc2 mediawiki mongodb mozilla msCash 
       mscash2 mschapv2 mssql MSSql05 MSSql12 mssql_no_upcase_change mysql 
       mysql-sha1 mysqlna netlmv2 netntlm netntlm_ess netntlmv2 ns nsldap 
       nsldaps NT nukedclan o5logon odf odf-1 office_2007 office_2010 
       office_2013 oldoffice openbsd-softraid openssha openssl-enc openvms 
       oracle oracle11 oracle_no_upcase_change osc panama pbkdf2-hmac-sha1 
       pbkdf2-hmac-sha1-p5k2 pbkdf2-hmac-sha1-pkcs5s2 pbkdf2-hmac-sha256 
       pbkdf2-hmac-sha512 pdf pfx PHPass PHPS pixMD5 pkzip PO postgres pst 
       putty pwdump pwsafe racf radmin rakp rar rar5 raw-blake2 raw-keccak 
       raw-keccak256 Raw-MD4 Raw-MD5 Raw-MD5u raw-SHA Raw-SHA1 Raw-SHA1u 
       raw-sha224 raw-sha256 raw-sha384 raw-sha512 raw-skein-256 raw-skein-512 
       raw-tiger raw-whirlpool raw_gost raw_gost_cp rawmd2 ripemd-128 
       ripemd-160 rsvp salted-sha1 SAP-H scrypt sevenz sha1crypt SHA1p SHA1s 
       sha256crypt sha512crypt siemens-s7 sip skey-md4 skey-md5 skey-rmd160 
       skey-sha1 snefru-128 snefru-256 ssh ssh-ng ssha512 strip sunmd5 sxc 
       sybase-prop SybaseASE tc_ripemd160 tc_sha512 tc_whirlpool tcp-md5 
       tripcode vnc vtp wbb3 whirlpool0 whirlpool1 wowsrp wpapsk XSHA XSHA512 
       zip 
magnumripper commented 9 years ago

What good are the stubs anyway?

jfoug commented 9 years ago

Let's me know which ones are left, do not remove them. Hog possibly. I doubt I will ever waste the time to handle that conveluted POS

jfoug commented 9 years ago

Hog = gpg. DAMN smart phone spell check.

magnumripper commented 9 years ago

Let's me know which ones are left, do not remove them.

Well it also lets everyone else NOT know which formats are actually supported. That's plain stupid.

They have to go away from the list of supported formats. Either we fix the generation of that list some way, or we remove the stubs - but they could of course be commented out and still "be there" in the code. Too bad Perl does not have block comments.

magnumripper commented 9 years ago

I incorrectly recalled we generated that list from what sub's we have but that is obviously not how we do it (that would be some clever Perl-fu). So we can just delete them from @funcs array while leaving the stubs in place and issue will be history. I really can't understand why you DID put them in the @funcs array though. It will take some time cleaning that up, checking every format whether it's an empty stub or not.

jfoug commented 9 years ago

Hmm, could Perl be used here ? :)

jfoug commented 9 years ago

Most are in a block of code around line 1100 or so

magnumripper commented 9 years ago

They were scattered but it wasn't that hard to fix so I will not whine any more about this.

Hmm, could Perl be used here ? :)

That would have been a fun exercise but it would probably have ended up taking 25 times longer :-)