GithubHelp home page GithubHelp logo

axfr's Introduction

axfr

AXFR does what it says, conducts zone transfers on domains against their authoritative name servers.

Installation

go install github.com/eatonchips/axfr@latest
git clone https://github.com/eatonchips/axfr
cd axfr
go install

Usage

Usage of axfr:
  -c, --csv string            Output file for csv format
  -d, --domains stringArray   Domain names to transfer
  -f, --file string           File containing domain names to transfer
  -j, --json string           Output file for json format
  -n, --nameserver string     DNS Server for resolving domain name servers
  -o, --output string         Output format (json,csv)
  -v, --verbose               Verbose output

Attempt transfer on domains from command line

axfr -d zonetransfer.me
$ axfr -d zonetransfer.me -d example.com
[*] Using nameserver: 10.0.0.1
[*] Attempting zone transfer for 2 domains
[+] Zone transfer successful for zonetransfer.me against nsztm1.digi.ninja, identified 50 records
[+] Zone transfer successful for zonetransfer.me against nsztm2.digi.ninja, identified 51 records
[-] Zone transfer failed for example.com against b.iana-servers.net: dns: bad xfr rcode: 5
[-] Zone transfer failed for example.com against a.iana-servers.net: dns: bad xfr rcode: 9

From file

axfr -f domains.txt

Domains provided via file and cli are combined.

axfr -f domains.txt -d zonetransfer.me

Output Formats

$ axfr -d zonetransfer.me -o csv,json
[*] Using nameserver: 1.1.1.1
[*] Using json output file: axfr-20240424-155029.json
[*] Using csv output file: axfr-20240424-155029.csv
[*] Attempting zone transfer for 1 domains
[+] Zone transfer successful for zonetransfer.me against nsztm2.digi.ninja, identified 51 records
[+] Zone transfer successful for zonetransfer.me against nsztm1.digi.ninja, identified 50 records
$ axfr -d zonetransfer.me -o csv,json --csv output.csv --json output.json
[*] Using nameserver: 1.1.1.1
[*] Using json output file: output.json
[*] Using csv output file: output.csv
[*] Attempting zone transfer for 1 domains
[+] Zone transfer successful for zonetransfer.me against nsztm1.digi.ninja, identified 50 records
[+] Zone transfer successful for zonetransfer.me against nsztm2.digi.ninja, identified 51 records

Specify NS lookup nameserver

$ axfr -d zonetransfer.me -n 8.8.8.8
[*] Using nameserver: 8.8.8.8
[*] Attempting zone transfer for 1 domains
[+] Zone transfer successful for zonetransfer.me against nsztm2.digi.ninja, identified 51 records
[+] Zone transfer successful for zonetransfer.me against nsztm1.digi.ninja, identified 50 records

Use specific domain nameservers

It can be useful to test zone transfers against other nameservers that may be indicated by current DNS NS records, such as historical nameservers that have not been decommisioned (https://dnshistory.org/). These can be specified by adding an @ symbol to the domain, either in the CLI flag or the file.

$ cat domains-file 
zonetransfer.me
[email protected]
[email protected]
[email protected]

$ axfr -f domains-file 
[*] Reading domains from file
[*] Using nameserver: 10.0.0.1
[*] Attempting zone transfer for 4 domains
[+] Zone transfer successful for zonetransfer.me against nsztm1.digi.ninja, identified 50 records
[+] Zone transfer successful for zonetransfer.me against nsztm2.digi.ninja, identified 51 records
[-] Zone transfer failed for zonetransfer.me against hal.ns.cloudflare.com: dns: bad xfr rcode: 1
[-] Zone transfer failed for zonetransfer.me against lisa.ns.cloudflare.com: dns: bad xfr rcode: 1
[-] Zone transfer failed for example.com against 1.1.1.1: dns: bad xfr rcode: 5

$ go run main.go -d [email protected]
[*] Using nameserver: 10.0.0.1
[*] Attempting zone transfer for 1 domains
[-] Zone transfer failed for zonetransfer.me against hal.ns.cloudflare.com: dns: bad xfr rcode: 1

axfr's People

Contributors

eatonchips avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.