Giter Club home page Giter Club logo

godaddy-ddns's People

Contributors

carledman avatar chrisswanson avatar cwilby avatar koksnuss avatar mgrankin avatar mmponn avatar pigen00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godaddy-ddns's Issues

HTTP Error 401

Hello!
I've just tried implementing this, but regardless of how I run the script (whether with direct arguments or a %file) Python reports HTTP error 401. I've tried recreating my key & secret but still getting the same thing. Any ideas?

Python3 version 3.6.8. As far as I can tell, all dependencies are installed (although apt doesn't find any of them - perhaps I'm just being dumb.

with Bash?

How can i run this script on bash script with arguments?
And how the output from the this script is saved to a log file?

my bash:
`
#!/bin/bash

mykey="blabla"
mysecret="blabla"
domain="bla.blabla.com"

python godaddy_ddns.py --key $mykey --secret $mysecret $domain >> out.txt

sleep 15
`

When run bash:
Traceback (most recent call last): File "godaddy_ddns.py", line 143, in <module> main() File "godaddy_ddns.py", line 86, in main with urlopen("http://ipv4.icanhazip.com/") as f: resp=f.read() AttributeError: addinfourl instance has no attribute '__exit__'

and empty out.txt

How to implement

Hi CarlEdman, this script looks great, but I'm a total noob, and it have 0 idea of how to implement this. Do you have a walk-through on this?

No longer able to update wildcard A record.

Hi!

I've been using your script for quite a while, but it somehow stopped working today for my wildcard A record.
I tried using both the godaddy_ddns.py --ip IP --key KEY --secret SECRET --ttl TTL *.domain method and the godaddy-ddns %godaddy-ddns.config method.

The script works for my other A record with name @, just not with my wildcard record.

Here's the error :

Traceback (most recent call last):
  File "/path-to-file/godaddy_ddns.py", line 128, in main
    with urlopen(req) as f: resp = f.read()
  File "/path-to-python/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/path-to-python/request.py", line 531, in open
    response = meth(req, response)
  File "/path-to-python/request.py", line 640, in http_response
    response = self.parent.error(
  File "/path-to-python/request.py", line 569, in error
    return self._call_chain(*args)
  File "/path-to-python/request.py", line 502, in _call_chain
    result = func(*args)
  File "/path-to-python/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/path-to-file/godaddy_ddns.py", line 162, in <module>
    main()
  File "/path-to-file/godaddy_ddns.py", line 154, in main
    raise Exception(msg)
Exception: Unable to set IP address: customer identified by --key and --secret options denied permission.
Correct values can be obtained from from https://developer.godaddy.com/keys/ and are ideally placed in a % file.

Let me know if there is anything else for me to test or provide feedback on.

Thanks in advance, and great work!!

HTTP Error 403: Forbidden

Hi,
I've had this script running successfully for years, now im getting "HTTP Error 403: Forbidden"
Here is the full error:

python3 /volume1/JF_STORAGE/SCRIPTS/godaddy-ddns-master/godaddy_ddns.py \%/volume1/JF_STORAGE/SCRIPTS/godaddy-ddns-master/godaddy-ddns.config

Traceback (most recent call last):
  File "/volume1/JF_STORAGE/SCRIPTS/godaddy-ddns-master/godaddy_ddns.py", line 128, in main
    with urlopen(req) as f: resp = f.read()
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/volume1/JF_STORAGE/SCRIPTS/godaddy-ddns-master/godaddy_ddns.py", line 162, in <module>
    main()
  File "/volume1/JF_STORAGE/SCRIPTS/godaddy-ddns-master/godaddy_ddns.py", line 154, in main
    raise Exception(msg)
Exception: Unable to set IP address: customer identified by --key and --secret options denied permission.
Correct values can be obtained from from https://developer.godaddy.com/keys/ and are ideally placed in a % file.

Any ideas?

Cheers,
Josh

Update vs Add

Would it be possible to include both record update and record add/delete?

Handling "origin" record

The "name" field can be "@" which means the root origin, however the program currently enforces HOST.DOMAIN.TOP and interprets @ for file paths.

Unfortunately, I suspect handling it would require a pretty thorough rewrite, but I figured I'd point it out.

Exception: Unable to automatically obtain IP address from http://ipv4.icanhazip.com/.

Hello,

a couple of days ago the script started not working for me:

/usr/local/sbin/godaddy_ddns.py --key $KEY$ --secret $SECRET$--ttl 600 @.domain.tld
`Traceback (most recent call last):
File "/usr/local/sbin/godaddy_ddns.py", line 92, in main
with urlopen("https://ipv4.icanhazip.com/") as f: resp=f.read()
File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.7/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/sbin/godaddy_ddns.py", line 162, in
main()
File "/usr/local/sbin/godaddy_ddns.py", line 97, in main
raise Exception(msg)
**Exception: Unable to automatically obtain IP address from http://ipv4.icanhazip.com/.**`

But if I run it from command line, I can get the ip address::

root@localhost:~# curl http://ipv4.icanhazip.com/
$mypublic IP$

the detailed log:
root@localhost:~# curl -i http://ipv4.icanhazip.com/
`HTTP/1.1 200 OK
Date: Mon, 01 Mar 2021 10:11:22 GMT
Content-Type: text/plain
Content-Length: 12
Connection: keep-alive
Set-Cookie: __cfduid=d6dd09ce480956bb6847e99eda9053e401614593482; expires=Wed, 31-Mar-21 10:11:22 GMT; path=/; domain=.ipv4.icanhazip.com; HttpOnly; SameSite=Lax
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
X-RTFM: Learn about this site at http://bit.ly/icanhazip-faq
X-THANK-YOU: Many thanks to the fine people at Cloudflare for keeping this site afloat!
cf-request-id: 088ede764800004dbed22a0000000001
Report-To: {"group":"cf-nel","endpoints":[{"url":"https://a.nel.cloudflare.com/report?s=LPt2EctSaulVAG6Z6QgBWFTRMp9%2FW1rXNl%2F25DP2DOMkQTnIc5hhnLfm0OjEOnHBm8o0oARt4Fp8%2BDLt9%2FAizs6%2BZLPzUNCzFKfxPmPL3HScIho%3D"}],"max_age":604800}
NEL: {"max_age":604800,"report_to":"cf-nel"}
Server: cloudflare
CF-RAY: 629199d07f294dbe-FRA

$my public IP$`

Any idea, what can be the problem?
thanks!

Multiple hosts

Would it be possible for someone to add the ability to update multiple hosts in one pass? Yes, I know I could run the script twice, but that seems like a waste to fetch the IP address a second time. I'm thinking it would be great to be able to pass in a host list, rather than a single host.

Thanks, josh

Tag v0.1

Thanks for the cool script. I'm looking forward to using it. I was going to package it up for Gentoo, and it would be helpful if you could tag release 0.1 in git.

Thanks :)

Interesting Error

I am now getting this error after going to Centos7

[root@padin ~]# /root/godaddy_updater.py %/root/godaddy-ddns.config

Traceback (most recent call last):
File "/root/godaddy_updater.py", line 141, in
main()
File "/root/godaddy_updater.py", line 84, in main
with urlopen("http://ipv4.icanhazip.com/") as f: resp=f.read()
AttributeError: addinfourl instance has no attribute 'exit'
[root@padin ~]#

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.