john icon indicating copy to clipboard operation
john copied to clipboard

command line arguments should be checked before opencl startup

Open rofl0r opened this issue 2 years ago • 4 comments

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.

rofl0r avatar Aug 15 '22 13:08 rofl0r

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?

magnumripper avatar Aug 16 '22 11:08 magnumripper

../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

rofl0r avatar Aug 16 '22 13:08 rofl0r

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.

magnumripper avatar Aug 16 '22 14:08 magnumripper

Not related to opencl, but for me one of the annoying things is -wordlist=invalidpath

ukasz avatar Aug 16 '22 14:08 ukasz