How acidvegas/mdaxfr works
Project type and purpose
• This is a command-line DNS-centric tooling project (full CLI application) whose main purpose is to perform mass DNS zone transfers (AXFR) for single domains, lists of domains, root nameservers, TLDs, and public-suffix TLDs. It also provides a daily scheduled run via GitHub Actions to scan root TLDs and collect results in the axfrout/ directory.
File structure
• Top level:
• mdaxfr → the main executable (Go or similar compiled binary).
• extras/ → auxiliary scripts and data sources (mdaxfr.py, icann_axfr, opennic, ozones).
• axfrout/ → output storage of daily AXFR logs for various servers/TLDs.
• .github/workflows/daily-axfr.yml → GitHub Actions workflow to run the tool on a schedule.
• .screens/preview.gif → demo animation for the README.
• README.md, LICENSE.
README for additional insights
• The README describes usage patterns (single, batched, GNU Parallel).
• It mentions a Python variant in extras/.
• It highlights integration points: DNS resolution, zone transfers, TLD lists from IANA or Public Suffix List, and GitHub Actions for scheduling.
Main components and their interactions
a. CLI Frontend (mdaxfr)
• Parses arguments (domain, list, flags).
• Reads stdin or file inputs.
b. Nameserver Discovery Module
• For each target domain:
• Resolves NS records.
• Resolves each nameserver to A/AAAA addresses.
c. AXFR Engine
• Attempts zone transfer to each nameserver IP.
• Applies concurrency controls (goroutines or threads).
• Prints or logs successful transfers with full zone data.
d. Output Handler
• Writes raw AXFR logs under axfrout/ when run via GitHub Actions.
• Writes to stdout when run interactively.
e. Extras Subsystem (extras/)
• Python implementation (mdaxfr.py) with more advanced concurrency flags.
• Auxiliary zone lists (icann_axfr, opennic, ozones).
f. Automation Layer (GitHub Actions)
• Scheduled cron job defined in daily-axfr.yml.
• Invokes ./mdaxfr --tlds (or similar) against root/TLD list.
• Commits results back to axfrout/.
Architectural patterns and design principles
• Modular design: Clear separation of CLI input, resolution logic, AXFR logic, and output handling.
• Concurrency pattern: Worker pools or goroutines to parallelize DNS lookups and AXFR attempts.
• Plugin-like “extras” folder for alternative implementations and data sources.
• Infrastructure as code: GitHub Actions manages scheduling and repository state updates.