john
john copied to clipboard
command line arguments should be checked before opencl startup
often one has some small error in the command line, for example a typo in a rule name, but when using -device=X and -format=foo-opencl, some sort of opencl startup code that takes several seconds is run before the commandline is checked and the error (example: rule not found) raised.
This was very much the case long ago but for nearly all OpenCL formats the problem should be gone. Do you have a specific example?
../JohnTheRipper/run/john -format=raw-sha512-opencl -device=1 -session=dev1 -pot=out.pot --loop --ru=leet --mask=?w?a?a?a res-john/uncracked/80.raw-sha512.1700
when executing this command with wrong rule name, one has to wait for john spinning up opencl stuff (spinning \-/-
animation shows up), then finally after 5 seconds error is reported.
Device 1: gfx900 [Radeon RX Vega]
Using default input encoding: UTF-8
Loaded 186 password hashes with no different salts (raw-SHA512-opencl [SHA512 OpenCL])
<--- insert spinning animation here, and wait 5 secs --->
LWS=256 GWS=16384 (64 blocks) x9025
Permutation rules: leet
No "leet" mode rules found in ../JohnTheRipper/run/john.conf
Oh right. The rules aren't looked at until the mode starts, and before that we have self-tests and autotune. I think I know how to add a pre-check early, will look at it some day.
Not related to opencl, but for me one of the annoying things is -wordlist=invalidpath