Upgrade Your Dynamic DNS Script for Hover: Key Improvements May 25, 2025 by
In my original post, I introduced a Python script for dynamic DNS updates using Hover domains. It got the job done — but let’s be honest — it had issues.
Cookies would silently expire, headers were brittle, debugging was painful, and while 2FA was implemented, it wasn’t always smooth.
This updated version fixes those problems. It’s cleaner, more robust, easier to maintain, and works more reliably in real-world conditions.
If you’ve used the original, this upgrade is a must.
✅ What’s Changed?
Rewritten from the Ground Up
The code has been completely restructured. Instead of relying on global variables and procedural flow, it’s now logically modular and far more readable.
Improved Cookie Management
Cookies are now stored and reloaded reliably using Python’s SimpleCookie
. Expired cookies are detected and automatically replaced by re-authenticating.
Reliable TOTP + 2FA Flow
The updated 2FA implementation integrates better with Hover’s expectations. It generates the TOTP code, submits it if requested, and logs the full flow so you can see what happened at every step.
Compatible with mitmproxy
for Debugging
If you use mitmproxy
to inspect HTTPS traffic, the script now supports it fully on both Windows and Linux. It even detects the platform and loads the right certificate authority file.
Improved Logging and Rotation
- Logs rotate daily to prevent clutter.
- You can adjust verbosity with
--loglevel
or inconfig.json
. - Debug logs include headers, payloads, and server responses — critical when troubleshooting.
Scheduled or On-Demand Mode
Want to run it every 10 minutes? Add --interval 600
. Just need a one-time update? Run it without arguments.
📁 Project Files
Here’s what you’ll find in the repository:
hover-update.py
— the main scriptconfig.json
— your settings (DNS ID, credentials, etc.)IP
— tracks the last-known public IPREADME.md
— instructions and options
🛠 Sample Configuration
{
"dnsid": "123456",
"username": "your-hover-username",
"password": "your-hover-password",
"totp_secret": "ABCDEF1234567890",
"discoverip": "true",
"srcdomain": "home.example.com",
"nakedDomain": "example.com",
"loglevel": "info",
"runInterval": 300
}
🚀 Usage Examples
Run once manually:
python hover-update.py
Run every 10 minutes:
python hover-update.py --interval 600
Enable debugging and traffic capture:
python hover-update.py --mitm --loglevel DEBUG
View or print your DNS IDs:
python hover-update.py --getDNSID
🧠 Final Thoughts
This script is now cleaner, more reliable, and significantly easier to work with — especially if you’re using 2FA or want better transparency in what’s happening behind the scenes.
If you were using the original script, I highly recommend replacing it with this new version. All existing functionality is preserved, but the internals are more robust and flexible.
As always, the code is available on GitHub and I’m open to suggestions or pull requests.
Let me know how it works for you — or if you hit any edge cases. I’ve been running this on my home server for weeks with zero failures.
— PJ