Hi Karl,

Thanks for your insightful comments and suggestions for WikiDNS 1.0.0.

I welcome feedback and invite you to test WikiDNS 2.1.2 with Python 3:

olekaa@INTELLIGENCE:~$ diff -uN wikidns-client.py~ wikidns-client.py
--- wikidns-client.py~  2024-02-11 01:29:14.906653812 +0100
+++ wikidns-client.py   2024-02-11 02:05:38.455941337 +0100
@@ -41,7 +41,7 @@
             print(f"DNS lookup result for {domain}:\n{result}")
         elif choice == '2':
             domain = input("Enter domain name: ")
-            record_type = input("Enter record type (A/MX/TXT/CNAME): ")
+            record_type = input("Enter record type 
(A/AAAA/MX/NS/SRV/TXT/CNAME): ")
             record_data = input("Enter record data: ")
             result = update_dns_record(domain, record_type, record_data)
             print(f"Response from server: {result}")
olekaa@INTELLIGENCE:~$ diff -uN wikidns-update.py~ wikidns-update.py
--- wikidns-update.py~  2024-02-10 23:27:34.073503163 +0100
+++ wikidns-update.py   2024-02-11 02:14:08.478646722 +0100
@@ -22,7 +22,7 @@
 # Main client function
 def run_update_client():
     domain = input("Enter domain name: ")
-    record_type = input("Enter record type (A/MX/TXT/CNAME): ")
+    record_type = input("Enter record type (A/AAAA/MX/NS/SRV/TXT/CNAME): ")
     record_data = input("Enter record data: ")
     response = update_dns_record(domain, record_type, record_data)
     print("Response from server:", response)

I am attaching the updated WikiDNS 2.1.2, update, client and server written in 
Python in this email.

The WikiDNS License is GNU GPLv3 or any later version with owners

    Copyright (C) 2024  Aamot Engineering <ole@aamot.engineering>
    Copyright (C) 2024  Ole Aamot <o...@gnu.org>

I have updated the Wikipedia page on 
https://en.wikipedia.org/wiki/Draft:WikiDNS<https://en.wikipedia.org/wiki/Draft:WikiDNS?fbclid=IwAR3k6M_KvVTHM3EM2Hsy6TmPDq9YS9bm0gXDtq4apWxPrCnaKJ7zRNZSGg4>
https://folk.ntnu.no/olekaam/wikidns-client.py (version 2.0.0)
https://folk.ntnu.no/olekaam/wikidns-server.py (version 1.0.0)
https://folk.ntnu.no/olekaam/wikidns-update.py (version 2.0.0)

I will version this release WikiDNS 2.1.2.
Above is an example of a WikiDNS update, client and server in 
Python<https://www.facebook.com/pythonlang?__cft__[0]=AZWdl2lenl90QIWeuVBVSCTqckXA0CvkrwaWkd-SqNHTaZKYRYfiRaOoKWDo2OscZj7_Cn_E7T9aN7T9ePdMJi9iYzhJy_syIPYs5tsmDEvCJ9gqbt9jWMV-Sth2b_8k6rCZkVdqVbfWIMCH8irritPdXtetIdBDdKXMhkcLn-9Itw&__tn__=-]K-R>.
The client will send requests to update DNS records to the WikiDNS server.
The server will respond to requests for DNS records from the WikiDNS server.
https://en.wikipedia.org/wiki/Draft:WikiDNS<https://en.wikipedia.org/wiki/Draft:WikiDNS?fbclid=IwAR3k6M_KvVTHM3EM2Hsy6TmPDq9YS9bm0gXDtq4apWxPrCnaKJ7zRNZSGg4>

Release Notes with a photo of the book title "Programming Python" (2011) by 
Mark Lutz
that you may need to learn Python in order to enhance or customize the WikiDNS 
software.

https://www.facebook.com/photo?fbid=10161936070955961&set=a.10153533314310961

Thank you for your interest in WikiDNS 2.1.2.


Sincerely,

Ole Kristian Aamot
Sole proprietor
Aamot Engineering
ole@aamot.engineering

________________________________
From: bind-users <bind-users-boun...@lists.isc.org> on behalf of Karl Auer 
<ka...@biplane.com.au>
Sent: Sunday, February 11, 2024 1:03 AM
To: bind-users@lists.isc.org <bind-users@lists.isc.org>
Subject: Re: Tonight I saved DNS - WikiDNS (version 1.0.0) - available with 
JSON records

On Sat, 2024-02-10 at 23:28 +0000, Ole Aamot wrote:
> Tonight I saved DNS from further bind usage in the Internet Software
> Consortium.
> [...]
> https://en.wikipedia.org/wiki/Draft:WikiDNS

"Submission rejected on 10 February 2024 by CoconutOctopus.
This topic is not sufficiently notable for inclusion in Wikipedia."

The database this project uses is impressively fast. The update
mechanism has one or two security niggles. The range of records
supported seems a little small, though I am sure it can be expanded to
include esoterics like e.g. NS, SRV and AAAA at some time in the
future. The decision to omit any form of permanent storage is
refreshing. DNSSEC, known for its complexity, has been omitted from
this implementation, which will please many users. Licensing is
unclear.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (ka...@biplane.com.au)
http://www.biplane.com.au/kauer



--
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users
import socket
import json

# Sample DNS records (A, MX, and other types)
dns_records = {
    "example.com": {
        "A": ["178.255.144.178"],
        "MX": [("piperpal.com", 10)],
        "TXT": ["piperpal.com"],
        "CNAME": ["www.piperpal.com"]
    },
    "test.com": {
        "A": ["178.255.144.178"],
        "MX": [("cdn.aasw.clh.no", 10)],
        "TXT": ["cdn.aasw.clh.no"],
        "CNAME": ["cdn.aasw.clh.no"]
    },
    "example.net": {
        "A": ["178.21.130.26"],
        "MX": [("mx.webhuset.no", 10)],
        "TXT": ["www.arkivarium.no"],
        "CNAME": ["www.arkivarium.no"]
    }
}

# Server configuration
HOST = '127.0.0.1'
PORT = 65432

# Function to handle DNS lookup requests
def handle_dns_lookup(data):
    domain = data.strip()
    if domain in dns_records:
        return json.dumps(dns_records[domain])
    else:
        return "Domain not found"

# Function to handle DNS update requests
def handle_dns_update(data):
    try:
        request_data = json.loads(data)
        if request_data["action"] == "update":
            domain = request_data["domain"]
            record_type = request_data["type"]
            record_data = request_data["data"]
            if domain in dns_records:
                if record_type in dns_records[domain]:
                    dns_records[domain][record_type].append(record_data)
                else:
                    dns_records[domain][record_type] = [record_data]
            else:
                dns_records[domain] = {record_type: [record_data]}
            return "DNS record updated successfully"
        else:
            return "Invalid action"
    except Exception as e:
        return f"Error: {e}"

# Main server function
def run_server():
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as server_socket:
        server_socket.bind((HOST, PORT))
        server_socket.listen()

        print(f"Server is listening on {HOST}:{PORT}")

        while True:
            conn, addr = server_socket.accept()
            with conn:
                print(f"Connected by {addr}")
                while True:
                    data = conn.recv(1024)
                    if not data:
                        break
                    data = data.decode()
                    if data.startswith("{") and data.endswith("}"):
                        response = handle_dns_update(data)
                    else:
                        response = handle_dns_lookup(data)
                    conn.sendall(response.encode())

if __name__ == "__main__":
    run_server()
import socket
import json

# Server configuration
SERVER_HOST = '127.0.0.1'
SERVER_PORT = 65432

# Function to send DNS lookup requests
def dns_lookup(domain):
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as client_socket:
        client_socket.connect((SERVER_HOST, SERVER_PORT))
        client_socket.sendall(domain.encode())
        response = client_socket.recv(1024)
        return response.decode()

# Function to send DNS update requests
def update_dns_record(domain, record_type, record_data):
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as client_socket:
        client_socket.connect((SERVER_HOST, SERVER_PORT))
        request_data = {
            "action": "update",
            "domain": domain,
            "type": record_type,
            "data": record_data
        }
        client_socket.sendall(json.dumps(request_data).encode())
        response = client_socket.recv(1024)
        return response.decode()

# Main client function
def run_client():
    while True:
        print("\n1. DNS Lookup")
        print("2. Update DNS Record")
        print("3. Quit")
        choice = input("Enter your choice: ")

        if choice == '1':
            domain = input("Enter domain name: ")
            result = dns_lookup(domain)
            print(f"DNS lookup result for {domain}:\n{result}")
        elif choice == '2':
            domain = input("Enter domain name: ")
            record_type = input("Enter record type (A/AAAA/MX/NS/SRV/TXT/CNAME): ")
            record_data = input("Enter record data: ")
            result = update_dns_record(domain, record_type, record_data)
            print(f"Response from server: {result}")
        elif choice == '3':
            break
        else:
            print("Invalid choice")

if __name__ == "__main__":
    run_client()

import socket
import json

# Server configuration
SERVER_HOST = '127.0.0.1'
SERVER_PORT = 65432

# Function to send DNS update requests
def update_dns_record(domain, record_type, record_data):
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as client_socket:
        client_socket.connect((SERVER_HOST, SERVER_PORT))
        request_data = {
            "action": "update",
            "domain": domain,
            "type": record_type,
            "data": record_data
        }
        client_socket.sendall(json.dumps(request_data).encode())
        response = client_socket.recv(1024)
        return response.decode()

# Main client function
def run_update_client():
    domain = input("Enter domain name: ")
    record_type = input("Enter record type (A/AAAA/MX/NS/SRV/TXT/CNAME): ")
    record_data = input("Enter record data: ")
    response = update_dns_record(domain, record_type, record_data)
    print("Response from server:", response)

if __name__ == "__main__":
    run_update_client()
-- 
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to