Python client for dnsdist console
Project description
Python client for dnsdist console
Author | Denis Machard d.machard@gmail.com |
License | MIT |
PyPI | https://pypi.org/project/dnsdist_console/ |
This is a Python 3 client for the dnsdist console
Table of contents
Installation
pip install dnsdist_console
Generate key
Generate a shared secret key. It will be used between the client and the server.
from dnsdist_console import Key
k = Key().generate()
print(k)
OTgmgAR6zbrfrYlKgsAAJn+by4faMqI1bVCvzacXMW0=
Save-it in your /etc/dnsdist/dnsdist.conf
with the setKey
directive.
Handshake
from dnsdist_console import Console
console_ip = "127.0.0.1"
console_port = 5199
console_key = "GQpEpQoIuzA6kzgwDokX9JcXPXFvO1Emg1wAXToJ0ag="
console = Console(host=console_ip,
port=console_port,
key=console_key)
Run command
Please refer to the dnsdist documentation for available commands.
o = console.send_command(cmd="showVersion()")
print(o)
dnsdist 1.4.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dnsdist_console-0.3.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for dnsdist_console-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1469c69ba6443abb7f5cd9d6ef887b8cf76f9ca8c58332866625cd6b67eff79 |
|
MD5 | 450461120362365741514994f20b235f |
|
BLAKE2b-256 | f064033773b3b232e6e6bdae69466d4bc327d313a46a88e68d094d9ba36fda7a |