devDNS
The DNS over devRant serviceOver the past year and a half, I have been hacking my way around the undocumented devRant auth/write API. At the request of devRant’s creators, this API must not be documented due to the way logins work on the platform. That is besides the point. I have been working on a little project called devDNS over the past few days that uses this undocumented API. Why must I be so bad at writing intros?
What is devDNS
devDNS is a devRant bot written in python. It will serve any valid DNS query from any user on the platform. A query is just a comment in one of the following forms:
@devDNS example.com
or
@devDNS MX example.com
Of course, MX
and example.com
are to be replaced with the domain and entry of your choosing.
devDNS was inspired by @1111Resolver, and the source is available on GitHub.
How it works
The Python script behind devDNS is very simple. devDNS does the following every 10 seconds:
- Fetch all new notifs
- Find only mentions
- Spin off a thread for each mention that passes a basic parser (Is the message 2 or 3 words long)
- In the thread, check if the message is a control message (allows me to view the status of the bot via devRant)
- Check if the request matches a required pattern
- Call
dnspython
with requested record and domain - Receive answer from a custom PIHole server with caching and super low latency
- Send a comment with the results to the requester
Thats it! Super simple, and only two days from concept to reality.
Where is this hosted?
This program is hosted on a raspberry pi laying in my room running docker. I also have Portainer set up so I can easily monitor the bot from my phone over my VPN.