A Python tool to extract UltraDNS SiteBacker Probe IPs from the UltraDNS REST API User Guide PDF.
This tool downloads the UltraDNS REST API User Guide PDF and extracts the IP Probes by Region table, which contains the IPv4 and IPv6 addresses used by UltraDNS SiteBacker probes. This information is useful for configuring firewall rules to allow traffic from these probes.
-
Clone this repository:
git clone https://github.com/sbarbett/sitebacker_probe_ips.git cd sitebacker_probe_ips -
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install the package:
pip install -e .
Run the tool with default settings:
python -m sitebacker_probe_ips.main
This will:
- Download the PDF from the UltraDNS website
- Search for the IP Probes by Region table
- Extract the IP addresses and regions
- Print the data to stdout in JSON format
usage: main.py [-h] [--url URL] [--output OUTPUT] [--format {json,csv,yaml}] [--verbose]
Extract UltraDNS SiteBacker Probe IPs from PDF
options:
-h, --help show this help message and exit
--url URL URL to download the PDF from
--output, -o OUTPUT Output file path (if not specified, prints to stdout)
--format, -f {json,csv,yaml}
Output format (default: json)
--verbose, -v Print verbose output, including PDF content
Extract data and save as CSV:
python -m sitebacker_probe_ips.main --format csv --output sitebacker_probes.csv
Extract data and save as YAML:
python -m sitebacker_probe_ips.main --format yaml --output sitebacker_probes.yaml
Enable verbose output:
python -m sitebacker_probe_ips.main --verbose
The JSON output is an array of objects, each representing a region with its IPv4 and IPv6 addresses:
[
{
"region": "North America - East",
"ipv4": [
"156.154.35.153",
"156.154.35.154",
...
],
"ipv6": [
"2610:a1:3008:128::153",
"2610:a1:3008:128::154",
...
]
},
...
]The YAML output has the same structure as JSON but in YAML format:
- region: North America - East
ipv4:
- 156.154.35.153
- 156.154.35.154
...
ipv6:
- 2610:a1:3008:128::153
- 2610:a1:3008:128::154
...The CSV output has three columns: Region, Type (IPv4 or IPv6), and IP Address:
Region,Type,IP Address
"North America - East",IPv4,156.154.35.153
"North America - East",IPv4,156.154.35.154
...
"North America - East",IPv6,2610:a1:3008:128::153
...
- PyMuPDF (fitz): For PDF parsing
- requests: For downloading the PDF
- PyYAML: For YAML output format
MIT