You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
581 B
Python

#! /bin/env python3
import argparse
import configparser
import dns.name
import dns.rdataset
import dns.rdatatype
import collections
from re2oapi import Re2oAPIClient
parser = argparse.ArgumentParser()
parser.add_argument("-c", "--config", help="Path to the config file", type=str,
default="config.ini")
args = parser.parse_args()
config = configparser.ConfigParser()
config.read(args.config)
api_client = Re2oAPIClient(config['Re2o']['hostname'], config['Re2o']['username'], config['Re2o']['password'],
use_tls=False)
zones = api_client.list("dns/zones")