/assets-from-spf

A Python script to parse net blocks & domain names from SPF record

Primary LanguagePython

assets-from-spf

  • A Python script to parse netblocks & domain names from SPF(Sender Policy Framework) DNS record
  • For every parsed asset, the script will also find and print Autonomous System Number(ASN) details
  • For now, the output is printed in JSON format only

Demo

script-in-action

Screenshots

3rd party package dependency

  1. ipwhois

  2. click

Setup

  • Clone this repo
$ git clone git@github.com:yamakira/assets-from-spf.git
  • Install dependencies
$ pipenv install
  • Check help menu
$ python assets_from_spf.py --help
Usage: assets_from_spf.py [OPTIONS] DOMAIN

Options:
  --asn / --no-asn  Enable/Disable ASN enumeration
  --help            Show this message and exit.

Usage

  • Parse the SPF record for assets but don't do ASN enumeration
$ python assets_from_spf.py target_url
  • Parse the SPF record for assets and do ASN enumeration
$ python assets_from_spf.py target_url --asn
$ python assets_from_spf.py target_url -a