fix: overhaul Hashview download flow and fix hashcat --show stderr pollution

- Merge download_left and download_found into single "Download Hashes" menu option
- Append found hash:clear pairs to potfile instead of running broken hashcat re-crack
- Append found hashes to left file so hashcat --show returns full results
- Clean up found_ temp files after merge
- Split found file on first colon (not last) to handle passwords containing colons
- Filter hashcat parse errors from --show stdout in _run_hashcat_show
- Add get_hcat_potfile_path() helper to api.py for potfile resolution
- Remove obsolete download_found_hashes API method and CLI subcommand
- Fix ollama tests to match current 4-arg hcatOllama signature and rule loop

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Justin Bollinger
2026-02-13 19:11:51 -05:00
co-authored by Claude Opus 4.6
parent ca1d71da6c
commit f9db54e84c
6 changed files with 346 additions and 1004 deletions
@@ -77,8 +77,7 @@ def _ensure_customer_one():
"--name",
"TestWordlist",
],
["hashview", "download-left", "--customer-id", "1", "--hashfile-id", "2"],
["hashview", "download-found", "--customer-id", "1", "--hashfile-id", "2"],
["hashview", "download-hashes", "--customer-id", "1", "--hashfile-id", "2"],
[
"hashview",
"upload-hashfile-job",
@@ -142,45 +141,25 @@ def test_hashview_subcommands_live_downloads():
base_cmd = [sys.executable, HATE_CRACK_SCRIPT, "hashview"]
customer_id = _ensure_customer_one()
left_cmd = base_cmd + [
"download-left",
dl_cmd = base_cmd + [
"download-hashes",
"--customer-id",
str(customer_id),
"--hashfile-id",
os.environ["HASHVIEW_HASHFILE_ID"],
]
left = subprocess.run(
left_cmd,
dl = subprocess.run(
dl_cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
cwd=REPO_ROOT,
env=env,
)
left_out = left.stdout + left.stderr
assert left.returncode == 0, left_out
assert "Downloaded" in left_out
assert "left_" in left_out
found_cmd = base_cmd + [
"download-found",
"--customer-id",
str(customer_id),
"--hashfile-id",
os.environ["HASHVIEW_HASHFILE_ID"],
]
found = subprocess.run(
found_cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
cwd=REPO_ROOT,
env=env,
)
found_out = found.stdout + found.stderr
assert found.returncode == 0, found_out
assert "Downloaded" in found_out
assert "found_" in found_out
dl_out = dl.stdout + dl.stderr
assert dl.returncode == 0, dl_out
assert "Downloaded" in dl_out
assert "left_" in dl_out
@pytest.mark.skipif(