response = DDNSProvider.send_request(self, self.url, data=data, username=self.username, password=self.password)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Handle success messages.
if output.startswith("good") or output.startswith("nochg"):
response = self.send_request(self.url, username=self.username, password=self.password)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Handle success messages.
if output.startswith("good") or output.startswith("nochg"):
response = self.send_request(self.url, username=self.username, password=self.password, data=data)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Handle success messages.
if output.startswith("ok") or output.startswith("nochange"):
response = self.send_request(self.url, data=data)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Remove all leading and trailing whitespace.
output = output.strip()
# https://www.dy.fi/page/clients?lang=en
# https://www.dy.fi/page/specification?lang=en
- url = "http://www.dy.fi/nic/update"
+ url = "https://www.dy.fi/nic/update"
# Please only send automatic updates when your IP address changes,
# or once per 5 to 6 days to refresh the address mapping (they will
response = self.send_request(self.url, data=data)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Remove all leading and trailing whitespace.
output = output.strip()
response = self.send_request(self.url, data=data, username=self.username, password=self.password)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Remove all leading and trailing whitespace.
output = output.strip()
response = self.send_request(self.url, data=data)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Handle success messages.
if output.startswith("200"):
response = self.send_request(self.url, data=data)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Handle success messages.
if self.get_xml_tag_value(output, "ErrCount") == "0":
response = self.send_request(url, data=data)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Handle success messages.
if output.startswith("Updated") or "has not changed" in output:
url = "https://svc.joker.com/nic/update"
+class DDNSProviderKEYSYSTEMS(DDNSProvider):
+ handle = "key-systems.net"
+ name = "dynamicdns.key-systems.net"
+ website = "https://domaindiscount24.com/"
+ protocols = ("ipv4",)
+
+ # There are only information provided by the domaindiscount24 how to
+ # perform an update with HTTP APIs
+ # https://www.domaindiscount24.com/faq/dynamic-dns
+ # examples: https://dynamicdns.key-systems.net/update.php?hostname=hostname&password=password&ip=auto
+ # https://dynamicdns.key-systems.net/update.php?hostname=hostname&password=password&ip=213.x.x.x&mx=213.x.x.x
+
+ url = "https://dynamicdns.key-systems.net/update.php"
+ can_remove_records = False
+
+ def update_protocol(self, proto):
+ address = self.get_address(proto)
+ data = {
+ "hostname" : self.hostname,
+ "password" : self.password,
+ "ip" : address,
+ }
+
+ # Send update to the server.
+ response = self.send_request(self.url, data=data)
+
+ # Get the full response message.
+ output = response.read().decode()
+
+ # Handle success messages.
+ if "code = 200" in output:
+ return
+
+ # Handle error messages.
+ if "abuse prevention triggered" in output:
+ raise DDNSAbuseError
+ elif "invalid password" in output:
+ raise DDNSAuthenticationError
+ elif "Authorization failed" in output:
+ raise DDNSRequestError(_("Invalid hostname specified"))
+
+ # If we got here, some other update error happened.
+ raise DDNSUpdateError
+
+
class DDNSProviderGoogle(DDNSProtocolDynDNS2, DDNSProvider):
handle = "domains.google.com"
name = "Google Domains"
class DDNSProviderLightningWireLabs(DDNSProvider):
handle = "dns.lightningwirelabs.com"
name = "Lightning Wire Labs DNS Service"
- website = "http://dns.lightningwirelabs.com/"
+ website = "https://dns.lightningwirelabs.com/"
# Information about the format of the HTTPS request is to be found
# https://dns.lightningwirelabs.com/knowledge-base/api/ddns
url = "https://dns.lightningwirelabs.com/update"
def update(self):
+ # Raise an error if no auth details are given.
+ if not self.token:
+ raise DDNSConfigurationError
+
data = {
"hostname" : self.hostname,
+ "token" : self.token,
"address6" : self.get_address("ipv6", "-"),
"address4" : self.get_address("ipv4", "-"),
}
- # Check if a token has been set.
- if self.token:
- data["token"] = self.token
-
- # Check for username and password.
- elif self.username and self.password:
- data.update({
- "username" : self.username,
- "password" : self.password,
- })
-
- # Raise an error if no auth details are given.
- else:
- raise DDNSConfigurationError
-
# Send update to the server.
response = self.send_request(self.url, data=data)
response = self.send_request(self.url, data=data)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Handle success messages.
if self.get_xml_tag_value(output, "IP") == address:
response = self.send_request(self.url, username=self.username, password=self.password, data=data)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Handle success messages.
if "100" in output or "101" in output:
response = self.send_request(self.url, data=data)
# Read response
- output = response.read()
+ output = response.read().decode()
# Server responds with OK if update was successful
if output.startswith("OK"):
response = self.send_request(self.url, username=self.username, password=self.password, data=data)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Handle success messages.
if output.startswith("<SUCCESS"):
response = self.send_request(self.url, data=data)
# Get the full response message.
- output = response.read()
+ output = response.read().decode()
# Handle success messages.
if output.startswith("success") or output.startswith("error-record-ip-same"):