new nrovider: dynup.de

Message ID c5bfbbae-6072-ea3d-e11a-6ef93ba095fa@t-online.de
State Accepted
Headers
Series new nrovider: dynup.de |

Commit Message

Stöckl May 1, 2018, 1:33 a.m. UTC
  name      = "EasyDNS"
  

Comments

Michael Tremer May 1, 2018, 4:08 a.m. UTC | #1
Hello Christian,

when I try to open the website of that provider, I only get a Forbidden page and
the documentation does not seem to exist either.

Who is operating this service and are you sure that the service is operational?

Best,
-Michael

On Mon, 2018-04-30 at 17:33 +0200, Stöckl wrote:
> 
> 
> diff --git a/README b/README
> index d8027a4..f45d128 100755
> --- a/README
> +++ b/README
> @@ -62,6 +62,7 @@ SUPPORTED PROVIDERS:
>   	dyndns.org
>   	dyns.cx|net
>   	dynu.com
> +	dynup.de
>   	easydns.com
>   	enom.com
>   	entrydns.net
> 
> 
> 
> diff --git a/src/ddns/providers.py b/src/ddns/providers.py
> index 6b25cb6..75e6c4c 100755
> --- a/src/ddns/providers.py
> +++ b/src/ddns/providers.py
> @@ -868,6 +868,43 @@ class DDNSProviderDynU(DDNSProtocolDynDNS2, 
> DDNSProvider):
>   		self.send_request(data)
> 
> 
> +class DDNSProviderDynUp(DDNSProvider):
> +	handle    = "dynup.de"
> +	name      = "DynUp.DE"
> +	website   = "http://dynup.de/"
> +	protocols = ("ipv4",)
> +
> +	# Information about the format of the HTTPS request is to be found
> +	# https://dyndnsfree.de/user/hilfe.php
> +
> +	url = "https://dynup.de/dyn.php"
> +	can_remove_records = False
> +
> +	def update_protocol(self, proto):
> +		data = {
> +			"username" : self.username,
> +			"password" : self.password,
> +			"hostname" : self.hostname,
> +			"print" : '1',
> +		}
> +
> +		# Send update to the server.
> +		response = self.send_request(self.url, data=data)
> +
> +		# Get the full response message.
> +		output = response.read()
> +
> +		# Remove all leading and trailing whitespace.
> +		output = output.strip()
> +
> +		# Handle success messages.
> +		if output.startswith("I:OK") :
> +			return
> +
> +		# If we got here, some other update error happened.
> +		raise DDNSUpdateError
> +
> +
>   class DDNSProviderEasyDNS(DDNSProvider):
>   	handle    = "easydns.com"
>   	name      = "EasyDNS"
> 
> 
> 
> 
> -- 
> Mit vielen Grüßen
>      aus Weißensberg, der Nahtstelle zwischen Allgäu & Bodensee
> 
>           Christian
> 
> -- 
> Mit vielen Grüßen
>      aus Weißensberg, der Nahtstelle zwischen Allgäu & Bodensee
> 
>           Christian Stöckl
>
  

Patch

diff --git a/README b/README
index d8027a4..f45d128 100755
--- a/README
+++ b/README
@@ -62,6 +62,7 @@  SUPPORTED PROVIDERS:
  	dyndns.org
  	dyns.cx|net
  	dynu.com
+	dynup.de
  	easydns.com
  	enom.com
  	entrydns.net



diff --git a/src/ddns/providers.py b/src/ddns/providers.py
index 6b25cb6..75e6c4c 100755
--- a/src/ddns/providers.py
+++ b/src/ddns/providers.py
@@ -868,6 +868,43 @@  class DDNSProviderDynU(DDNSProtocolDynDNS2, 
DDNSProvider):
  		self.send_request(data)


+class DDNSProviderDynUp(DDNSProvider):
+	handle    = "dynup.de"
+	name      = "DynUp.DE"
+	website   = "http://dynup.de/"
+	protocols = ("ipv4",)
+
+	# Information about the format of the HTTPS request is to be found
+	# https://dyndnsfree.de/user/hilfe.php
+
+	url = "https://dynup.de/dyn.php"
+	can_remove_records = False
+
+	def update_protocol(self, proto):
+		data = {
+			"username" : self.username,
+			"password" : self.password,
+			"hostname" : self.hostname,
+			"print" : '1',
+		}
+
+		# Send update to the server.
+		response = self.send_request(self.url, data=data)
+
+		# Get the full response message.
+		output = response.read()
+
+		# Remove all leading and trailing whitespace.
+		output = output.strip()
+
+		# Handle success messages.
+		if output.startswith("I:OK") :
+			return
+
+		# If we got here, some other update error happened.
+		raise DDNSUpdateError
+
+
  class DDNSProviderEasyDNS(DDNSProvider):
  	handle    = "easydns.com"