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.4.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for dnsdist_console-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dd1b076e0db78e60bacb3ed9b1374c202432be5b16d10fea2e674511d01212d |
|
MD5 | 5229b6496444d6251ef5433a4b0a94e0 |
|
BLAKE2b-256 | 87a98320b3e30570accc5dfd6e46a8c09edb71db4559ce9e75143add8e5a1d77 |