Repository navigation
Conversation
A failed keyspace measure, and its PRINCE and preprocessor variants, sent the
server only "Keyspace measure failed!", so the web UI showed an agent error
with no reason. hashcat's own output, which names the actual problem, was
logged locally and then dropped.
Capture it and append it to the error sent to the server, ANSI stripped and
tail capped so it cannot overflow the error column. See issue 746.
./hashcat --keyspace --quiet -a 3 '?9?9?9'
Syntax error in mask: ?9?9?9
rc=255
Driving measure_keyspace with that real output as the failing subprocess:
before: send_error -> 'Keyspace measure failed!'
after: send_error -> 'Keyspace measure failed! Syntax error in mask: ?9?9?9\n\n0'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to the broken-task feature (server PR
hashtopolis/server#2509, web UI PR
hashtopolis/web-ui#828): they surface this error as the
reason a task is broken, so it reads as the real cause instead of a bare
"Keyspace measure failed!".
A failed keyspace measure (and the PRINCE and preprocessor variants) sent the
server only "Keyspace measure failed!", so the web UI showed an agent error with
no reason. hashcat's own output, which names the cause, was logged locally and
dropped.
Reproduction
Changes
helpers.format_error_detail: decode bytes, strip ANSI, normalise newlines,keep the tail, cap at 2000 chars.
hashcat_cracker: the keyspace, PRINCE and preprocessor paths append thedetail to the error they send (PRINCE and preprocessor now capture stderr).
tests/test_error_detail.py: unit tests for the helper and the keyspacefailure path.
Testing