Fix ghunt creds loading, -o md/pdf export, CLI poll timeout, account_discovery noise - #5
Open
memmmmike wants to merge 4 commits into
Open
Fix ghunt creds loading, -o md/pdf export, CLI poll timeout, account_discovery noise#5memmmmike wants to merge 4 commits into
memmmmike wants to merge 4 commits into
Conversation
_load_creds called the removed ghunt.helpers.auth.load_creds(creds, file=), falling back to json.loads on the base64 creds.m and failing with "Expecting value: line 1 column 1". Load via GHuntCreds(creds_path).load_creds() first; keep the old helpers.auth call and JSON read as version fallbacks. Fix the setup doc (creds.m in ~/.malfrats, base64 not JSON) and add a regression test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The CLI derived the export format as ext.lstrip("."), sending format=md for
-o report.md and format=mtgx for -o report.mtgx. Neither matches a registered
exporter (markdown/maltego), so the export endpoint returned 422 and no file
was written (silently, since the error printed to redirected stdout). Add an
explicit extension->format map and use it. Add a regression test pinning every
supported extension to a registered exporter.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ailable"
The completion poll capped at 60 x 2s = 120s and then returned exit code 3
("server unavailable"), so any full investigation running longer than 120s
was misreported as a failure even though the backend completed and persisted
the report. Replace the two duplicated 120s poll loops with a single
_poll_report_until_done helper that waits up to 600s, does a final fetch
before giving up, and only signals timeout when the server is still running.
A completed-but-slow run now returns its real status. Add regression tests.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ARTIAL
Individual Holehe site probes raise as sites change; the module dumped bare
exception strings ("", "'found'", "'NoneType' object has no attribute 'get'")
into errors and let a few broken sites drag the whole module to PARTIAL/FAILED.
Attribute each probe failure to its platform, summarize them in one error line,
and treat per-site failures as expected noise: status is SUCCESS whenever any
probe returned a definitive result, FAILED only on a total washout. Add tests.
Co-Authored-By: Claude Opus 4.8 <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
Fixes four bugs surfaced while wiring up GHunt and running full investigations, each as its own commit with a regression test.
fix(ghunt)_load_credscalled the removedghunt.helpers.auth.load_creds(creds, file=), then fell back tojson.loadson the base64creds.m, failing withExpecting value: line 1 column 1. Now loads viaGHuntCreds(creds_path).load_creds(), keeping the old paths as version fallbacks.fix(cli)export-o report.md/.mtgxderived the format asext.lstrip("."), sendingformat=md/mtgxwhich no exporter registers (markdown/maltego) → 422, no file written, no visible error. Adds an explicit extension→format map.fix(cli)poll_poll_report_until_donehelper (600s, final fetch before giving up, timeout only when genuinely still running).fix(account_discovery)"","'found'","'NoneType' object has no attribute 'get'") and dragged the module to PARTIAL/FAILED. Now attributed per-platform, summarized in one error line, and treated as expected noise: SUCCESS whenever any probe returned a definitive result, FAILED only on a total washout.Also corrects
docs/ghunt-setup.md(creds live at~/.malfrats/ghunt/creds.mas base64, notghunt_creds.json).Testing
Four new test modules (8 tests), all green:
tests/modules/test_ghunt_module.py— loader uses the GHuntCreds object APItests/test_export_extension_mapping.py— every-oextension maps to a registered exportertests/test_investigate_poll.py— slow-but-successful run is not a timeout; timeout only when still runningtests/modules/test_account_discovery.py— probe failures attributed and non-fatal; total washout → FAILEDNotes
[ghunt]extra;ghunt2.3.x pinspillow<11, which has no cp314 wheel, so the extra needs Python ≤3.13.-o .pdfstill requiresweasyprint(mailaccess[pdf]); unchanged, that path degrades gracefully.🤖 Generated with Claude Code