Skip to content

AXFR Only Outputs in JSON Mode #883

Description

@knavesec

dnsx version: 1.2.2

Current Behavior:

Doing AXFR checks against a known-vulnerable example does not result in valid results.

echo "zonetransfer.me" | dnsx -axfr 
echo "zonetransfer.me" | dnsx -axfr --json

The former does not output the results of the zone transfer check, the latter does and must be parsed out of the JSON values.

Expected Behavior:

For non-JSON output, I would expect an output similar to an equivalent dig command below

dig axfr zonetransfer.me @nsztm1.digi.ninja +short

An equivalent would effectively be the command below, but obviously requires more steps

echo "zonetransfer.me" | dnsx -axfr --json | jq -r '.axfr.chain[0].all[]'

Alternatively, just a raw list of records would be nice as well rather than the records and responses similar to hakaxfr.

Steps To Reproduce:

Its unclear if this is intended behavior since there is a very deliberate check to see if JSON is set as the output method before printing results https://github.com/projectdiscovery/dnsx/blob/dev/internal/runner/runner.go#L684

Since the check is fairly explicit not to output if not JSON, it's likely more of a choice than bug, but wanted to raise it nonetheless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.Type: DiscussionSome ideas need to be planned and disucssed to come to a strategy.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions