Skip to content

Fix JSON structure for multi-target scans and swallowed error messages#65

Merged
santoru merged 1 commit into
masterfrom
fix/json-structure-and-swallowed-errors
Mar 7, 2026
Merged

Fix JSON structure for multi-target scans and swallowed error messages#65
santoru merged 1 commit into
masterfrom
fix/json-structure-and-swallowed-errors

Conversation

@santoru

@santoru santoru commented Mar 7, 2026

Copy link
Copy Markdown
Owner

Bug 1: information_disclosure and caching were stored as top-level keys in json_headers rather than nested under the URL key alongside present and missing. When scanning multiple targets, each target's data overwrote the previous one. Fixed by writing into json_results instead.

Bug 2: Two print() calls in check_target (UnknownProtocol and "Couldn't read a response from server.") were silently swallowed when -j was active, because -j redirects sys.stdout to devnull. Fixed by using sys.stderr.write() so errors are always visible.

Tests updated to reflect the corrected nested JSON structure and to assert error messages reach stderr.

Bug 1: information_disclosure and caching were stored as top-level keys
in json_headers rather than nested under the URL key alongside present
and missing. When scanning multiple targets, each target's data
overwrote the previous one. Fixed by writing into json_results instead.

Bug 2: Two print() calls in check_target (UnknownProtocol and
"Couldn't read a response from server.") were silently swallowed when
-j was active, because -j redirects sys.stdout to devnull. Fixed by
using sys.stderr.write() so errors are always visible.

Tests updated to reflect the corrected nested JSON structure and to
assert error messages reach stderr.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@santoru santoru merged commit 2e8a08d into master Mar 7, 2026
5 checks passed
@santoru santoru deleted the fix/json-structure-and-swallowed-errors branch March 7, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant