Date: Mon, 17 Jan 2022 21:45:12 +0100 From: magnum <magnumripper@...hmail.com> To: john-users@...ts.openwall.com Subject: Re: Grammar for dynamic function On 2022-01-17 17:42, Rodrigo s wrote: > What I am trying to do is this function: > *sha512($u.$p.$s)* The easy way is to use the "dynamic ad-hoc" (or dynamic compiler) format because you can use that literal formula you wrote above, like this: $ ./john -test -format:'dynamic=sha512($u.$p.$s)' Benchmarking: dynamic=sha512($u.$p.$s) [256/256 AVX2 4x]... DONE Many salts: 5278K c/s real, 5278K c/s virtual Only one salt: 4710K c/s real, 4710K c/s virtual Please note that you need hyphens around the formula so your shell doesn't act up with the dollar signs. The input format is: user:<hex hash>$<salt> So here's a hash with username "JRLuser", salt "TheSalt" and a password of "magnum": echo > test.in 'JRLuser:23750433e3685f544c02884cd622570f3d73b359be7dc5d9d5e87c3e394fc53f16dfad34d02680f24d99036aba63014be1343fe60e5391d8366d7be7b432db17$TheSalt' $ ./john -format:'dynamic=sha512($u.$p.$s)' test.in Using default input encoding: UTF-8 Loaded 1 password hash (dynamic=sha512($u.$p.$s) [256/256 AVX2 4x]) Warning: no OpenMP support for this hash type, consider --fork=16 Proceeding with single, rules:Single Press 'q' or Ctrl-C to abort, almost any other key for status Almost done: Processing the remaining buffered candidate passwords, if any. Proceeding with wordlist:./password.lst magnum (JRLuser) 1g 0:00:00:00 DONE 2/3 (2022-01-17 21:39) 100.0g/s 2137Kp/s 2137Kc/s 2137KC/s 123456..Geronimo No remaining hashes Use the "--show --format=dynamic=sha512($u.$p.$s)" options to display all of the cracked passwords reliably Session completed. In case you need/want to put the salt in hex, use HEX$ like this: user:<hex hash>$HEX$<hex salt> Hope this helps. magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.