Memory Wiki
โ† Back to logs

Cloudflare DynDNS Updater ยท Jul 05 11:34

Jul 05, 2026 ยท 04:30 PM
Ended: Jul 05, 2026 ยท 04:34 PM
Teksploits
User
[IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to the user โ€” do NOT use send_message or try to deliver the output yourself. Just produce your report/output as your final response and the system handles the rest. SILENT: If there is genuinely nothing new to report, respond with exactly "[SILENT]" (nothing else) to suppress delivery. Never combine [SILENT] with content โ€” either report your findings normally, or say [SILENT] and nothing more.]

Run this command and follow the instructions below:

bash /root/.hermes/skills/cf-dyndns.sh 2>&1

- If the output contains "STATUS:NO_CHANGE": Send NOTHING. Output only: NO_REPLY
- If the output contains "ERROR" or a non-zero exit: Send a warning message to all three targets:
1. "telegram:-1003980922525" (Telegram private channel)
2. "discord:1511697499654459422" (Discord private channel)
3. "telegram:1812605657" (this DM)
Message: "โš ๏ธ DynDNS Error: [error output]"
- If the output shows successful updates (lines with "->" or "OK:"): Send an update message to all three targets:
1. "telegram:-1003980922525" (Telegram private channel)
2. "discord:1511697499654459422" (Discord private channel)
3. "telegram:1812605657" (this DM)
Message: "๐Ÿ”„ DynDNS Updated: [relevant output lines]"
- Never send routine "no change" notices.
Assistant
{"output": "#!/bin/bash\n# Cloudflare DynDNS Updater for teksploits.com\n# Updates A records when the server's public IP changes.\n\nCF_API_TOKEN=\"cfut_d...c1ae\"\nZONE_ID=\"553f36e451d7719ed5768637faeb63bc\"\nLOG_FILE=\"/var/log/cf-dyndns.log\"\nSTATE_FILE=\"/var/lib/cf-dyndns/last_ip\"\n\nmkdir -p /var/lib/cf-dyndns\ntouch \"$LOG_FILE\"\n\nlog() {\n echo \"$(date '+%Y-%m-%d %H:%M:%S') $1\" >> \"$LOG_FILE\"\n}\n\n# Get current public IP\nCURRENT_IP=$(curl -s --max-time 10 https://api.ipify.org 2>/dev/null)\nif [ -z \"$CURRENT_IP\" ]; then\n log \"ERROR: Failed to fetch current public IP\"\n exit 1\nfi\n\n# Read last known IP\nLAST_IP=\"\"\n[ -f \"$STATE_FILE\" ] && LAST_IP=$(cat \"$STATE_FILE\")\n\nif [ \"$CURRENT_IP\" = \"$LAST_IP\" ]; then\n log \"IP unchanged ($CURRENT_IP) - no update needed\"\n echo \"STATUS:NO_CHANGE\"\n exit 0\nfi\n\nlog \"IP changed: $LAST_IP -> $CURRENT_IP - updating DNS records...\"\n\n# Update wiki.teksploits.com\nRESULT=$(curl -s -X PUT \\\n \"https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records/c16637b7bbe6fd1545c9d3d55fa3a052\" \\\n -H \"Authorization: Bearer *** \\\n -H \"Content-Type: application/json\" \\\n -d \"{\\\"type\\\":\\\"A\\\",\\\"name\\\":\\\"wiki.teksploits.com\\\",\\\"content\\\":\\\"${CURRENT_IP}\\\",\\\"ttl\\\":300,\\\"proxied\\\":false}\")\n\nSUCCESS=$(echo \"$RESULT\" | python3 -c \"import sys,json; print(json.load(sys.stdin).get('success',False))\" 2>/dev/null)\nif [ \"$SUCCESS\" = \"True\" ]; then\n log \" OK: wiki.teksploits.com -> ${CURRENT_IP}\"\nelse\n log \" FAIL: wiki.teksploits.com: $RESULT\"\nfi\n\n# Update location.teksploits.com\nRESULT=$(curl -s -X PUT \\\n \"https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records/7cb34c914d8023b5565c6c806cbe463e\" \\\n -H \"Authorization: Bearer *** \\\n -H \"Content-Type: application/json\" \\\n -d \"{\\\"type\\\":\\\"A\\\",\\\"name\\\":\\\"location.teksploits.com\\\",\\\"content\\\":\\\"${CURRENT_IP}\\\",\\\"ttl\\\":300,\\\"proxied\\\":false}\")\n\nSUCCESS=$(echo \"$RESULT\" | python3 -c \"import sys,json; print(json.load(sys.stdin).get('success',False))\" 2>/dev/null)\nif [ \"$SUCCESS\" = \"True\" ]; then\n log \" OK: location.teksploits.com -> ${CURRENT_IP}\"\nelse\n log \" FAIL: location.teksploits.com: $RESULT\"\nfi\n\n\n# Update dashboard.teksploits.com\nRESULT=$(curl -s -X PUT \\\n \"https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records/466bb61d2ea955288a229bf7263307d4\" \\\n -H \"Authorization: Bearer *** \\\n -H \"Content-Type: application/json\" \\\n -d \"{\\\"type\\\":\\\"A\\\",\\\"name\\\":\\\"dashboard.teksploits.com\\\",\\\"content\\\":\\\"${CURRENT_IP}\\\",\\\"ttl\\\":300,\\\"proxied\\\":false}\")\n\nSUCCESS=$(echo \"$RESULT\" | python3 -c \"import sys,json; print(json.load(sys.stdin).get('success',False))\" 2>/dev/null)\nif [ \"$SUCCESS\" = \"True\" ]; then\n log \" OK: dashboard.teksploits.com -> ${CURRENT_IP}\"\nelse\n log \" FAIL: dashboard.teksploits.com: $RESULT\"\nfi\n\n# Save new IP\necho \"$CURRENT_IP\" > \"$STATE_FILE\"\nlog \"DynDNS update complete\"", "exit_code": 0, "error": null}
Assistant
{"output": "STATUS:NO_CHANGE", "exit_code": 0, "error": null}
Assistant
NO_REPLY