m-adamski / python-cloudflare-zones-scanner

The tool creates a list of DNS entries for all domains managed by Cloudflare

Repository from Github https://github.comm-adamski/python-cloudflare-zones-scannerRepository from Github https://github.comm-adamski/python-cloudflare-zones-scanner

Cloudflare Zones Scanner

The tool creates a list of DNS entries for all domains managed by Cloudflare.

Usage

usage: main [-h] [--xlsx-file XLSX_FILE] token

The tool creates a list of DNS entries for all domains managed by Cloudflare

positional arguments:
  token                 Cloudflare API Token with permission to read Zone and DNS entries

optional arguments:
  -h, --help            show this help message and exit
  --xlsx-file XLSX_FILE
                        The name of the resulting file in XLSX format

Cloudflare API Token

In order to generate a list of domains and DNS entries, the tool needs access to your Cloudflare account. Generate API Token with permission to read Zone and DNS entries (Zone.Zone, Zone.DNS).

Installation

The module uses additional packages that must be installed with the package installer for Python. To do this, run the command:

pip install -r requirements.txt

or by using the make utility:

make install

Running the module

python main TOKEN_HERE --xlsx-file=cloudflare.xlsx

Virtual environment

The venv module provides support for creating "virtual environments" with your own independent set of Python packages. In order to prepare a virtual environment, we must first create it and then connect to it:

python -m venv ./venv && source ./venv/Scripts/activate

or by using the make utility:

make venv

Instead of installing packages globally, we can only install them in a created virtual environment.

In order to run the module with automatic connection to the virtual environment, the bin/run-venv.sh file has been prepared. Just run the command in the console:

bin/run-venv.sh TOKEN_HERE --xlsx-file=cloudflare.xlsx

License

MIT

About

The tool creates a list of DNS entries for all domains managed by Cloudflare

License:MIT License


Languages

Language:Python 94.0%Language:Shell 3.2%Language:Makefile 2.8%