fix(hashview): align integration with Hashview v0.8.3-dev API routes#113
Open
bandrel wants to merge 5 commits into
Open
fix(hashview): align integration with Hashview v0.8.3-dev API routes#113bandrel wants to merge 5 commits into
bandrel wants to merge 5 commits into
Conversation
The customer->hashfile flow called GET /v1/hashfiles to list all
hashfiles, then filtered client-side. That route does not exist in
Hashview (confirmed against v0.8.3-dev), so it 404'd as soon as a
customer ID was entered ("Could not list hashfiles").
Hashview exposes no list-all route; the only enumeration endpoint is
GET /v1/hashfiles/hash_type/<hash_type>, which already returns
customer_id and hash_type per file. Rebuild get_customer_hashfiles on
top of get_hashfiles_by_type, scoped to the session hash type
(hcatHashType), and filter by customer. Also fix get_hashfile_details
to call GET /v1/getHashType/<id> instead of the nonexistent
/v1/hashfiles/<id>/hash_type. Remove the dead list_hashfiles wrapper.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Continues the v0.8.3-dev API alignment beyond the hashfile-listing 404: - download_left_hashes: "left" hashes are GET /v1/hashfiles/<id> (returns uncracked ciphertexts), not the nonexistent /<id>/left. - delete_job: DELETE /v1/jobs/<id>, not GET /v1/jobs/delete/<id>. - start_job: POST /v1/jobs/start/<id>, not GET (route is POST-only). - stop_job: Hashview has no stop route; raise NotImplementedError pointing at delete_job rather than calling a phantom endpoint. - found-hash bulk export: no such route exists (only single-hash POST /v1/search); the best-effort merge is documented and degrades gracefully on the expected 404. Adds offline tests asserting start_job POSTs, delete_job uses DELETE, and stop_job raises. Documents the release in README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The download-hashes flow scoped the customer hashfile listing to hcatHashType, but that is None when the Hashview menu is entered without a hashfile loaded this session -> "No hashfiles of type None found". Since Hashview only lists hashfiles per type, prompt for a hashcat hash-type when none is set (Q cancels back to the menu) and use it for the listing. Downstream selection still derives the real type from the chosen hashfile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…type Downloading previously required knowing/typing the hash type because Hashview only lists hashfiles per type. The download flow now sweeps common hashcat modes (HashviewAPI.get_all_customer_hashfiles) and shows all of the customer's uploaded hashfiles to pick from, deduped by id. A manual hash-type prompt remains as a fallback only when nothing is found among the common set (uncommon modes). The chosen file's real hash type still drives the download. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…bsent The hashfile-listing route (/v1/hashfiles/hash_type/<type>) only exists on Hashview builds from 2026-06-08+ (v0.8.3-dev). On `main` and older servers it 404s, which surfaced as "Could not list hashfiles" and a dead end. The download flow is now version-adaptive: - get_all_customer_hashfiles stops sweeping after the first 404 (the listing endpoint is absent) instead of probing every common type. - The menu treats listing as best-effort: when no listing is available it prints a clear note and accepts a hashfile ID typed directly (read from the web UI), with no list-membership check. The chosen file's type is resolved via GET /v1/getHashType/<id> and downloaded via GET /v1/hashfiles/<id> -- both present on all server versions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
The Hashview integration called several API routes that don't exist in Hashview (verified against the
v0.8.3-devbranch the server runs). The most visible symptom: entering a customer ID immediately 404'd withWarning: Could not list hashfiles: 404 Client Error: NOT FOUND for url: …/v1/hashfiles.These are all client-side bugs in hate_crack — wrong paths/methods, or assuming capabilities the API doesn't expose. Fixes:
GET /v1/hashfiles(no list-all route)GET /v1/hashfiles/hash_type/<type>, scoped to the session hash type, filtered by customerGET /v1/hashfiles/<id>/hash_typeGET /v1/getHashType/<id>GET /v1/hashfiles/<id>/leftGET /v1/hashfiles/<id>GET /v1/jobs/delete/<id>DELETE /v1/jobs/<id>GET /v1/jobs/start/<id>POST /v1/jobs/start/<id>Two operations have no equivalent in the v0.8.3-dev API and are handled honestly instead of calling phantom endpoints:
stop_job()now raisesNotImplementedErrorpointing atdelete_job().POST /v1/searchexists; the best-effort found-merge indownload_left_hashesis documented and degrades gracefully on the expected 404.The dead
list_hashfiles()wrapper (only consumer of the phantom list-all route) was removed.Testing
HATE_CRACK_SKIP_INIT=1 uv run pytest— 901 passed, 24 skippeduv run ruff check hate_crack— clean;uv run ty check— no new diagnosticsstart_jobPOSTs,delete_jobuses DELETE verb,stop_jobraises.🤖 Generated with Claude Code