chralu / gandyn Goto Github PK
View Code? Open in Web Editor NEWGandi domain updater script for dynamic IP addresses.
Gandi domain updater script for dynamic IP addresses.
It could be useful if we can use
LOG_FILE = os.environ['LOG_FILE']
inside gandyn.conf
I received an email from Gandi today, explaining they had to modify their API for a security issue.
Does it affect Gandyn?
Excerpt of the email (in French) :
Il est nécessaire de vérifier votre code et plus précisément
l'utilisation ou non de la méthode
"gandi.api.domains.zone.record::list".Le cas échéant, notez que l'utilisation de cette méthode a été modifiée,
en particulier le type du champs 'id' remonté par cette fonction. Votre
code doit dorénavant accepter le fait que le champs 'id' soit une chaîne
de charactères (string) et non plus un entier (i4 en xmlrpc).Les deux seules fonctions utilisant cet 'id' en entrée sont :
- gandi.api.domains.zone.record::update
- gandi.api.domains.zone.record::list (filtre sur l'id)
Afin d'assurer la rétrocompatibilité optimale, ces deux fonctions
acceptent toujours un type "entier" en entrée pour le champs 'id' en
plus du type "chaîne de charactères". Il est cependant fortement
recommandé d'utiliser le type "chaîne de charactères".
From what I understand, I don't think Gandyn is affected, as it is written in Python and relies on dynamic typing. I suppose it accepts ids as string or integer.
Could you confirm?
Hello
Gandyn does not work anymore, this is the exit of the terminal.
If someone has an idea ?
Thank you
Traceback (most recent call last): File "/usr/bin/gandyn.py", line 161, in <module> main(sys.argv, globals(), locals()) File "/usr/bin/gandyn.py", line 143, in main previous_ip_address = gandi_updater.get_record_value() File "/usr/bin/gandyn.py", line 53, in get_record_value self.record File "/usr/lib/python3.7/xmlrpc/client.py", line 1112, in __call__ return self.__send(self.__name, args) File "/usr/lib/python3.7/xmlrpc/client.py", line 1446, in __request allow_none=self.__allow_none).encode(self.__encoding, 'xmlcharrefreplace') File "/usr/lib/python3.7/xmlrpc/client.py", line 971, in dumps data = m.dumps(params) File "/usr/lib/python3.7/xmlrpc/client.py", line 502, in dumps dump(v, write) File "/usr/lib/python3.7/xmlrpc/client.py", line 524, in __dump f(self, value, write) File "/usr/lib/python3.7/xmlrpc/client.py", line 528, in dump_nil raise TypeError("cannot marshal None unless allow_none is enabled") TypeError: cannot marshal None unless allow_none is enabled
i my key and conf seems correct
I have this error
Traceback (most recent call last): File "/usr/local/bin/gandyn.py", line 161, in <module> main(sys.argv, globals(), locals()) File "/usr/local/bin/gandyn.py", line 143, in main previous_ip_address = gandi_updater.get_record_value() File "/usr/local/bin/gandyn.py", line 53, in get_record_value self.record File "/usr/lib/python3.5/xmlrpc/client.py", line 1092, in __call__ return self.__send(self.__name, args) File "/usr/lib/python3.5/xmlrpc/client.py", line 1426, in __request allow_none=self.__allow_none).encode(self.__encoding, 'xmlcharrefreplace') File "/usr/lib/python3.5/xmlrpc/client.py", line 951, in dumps data = m.dumps(params) File "/usr/lib/python3.5/xmlrpc/client.py", line 501, in dumps dump(v, write) File "/usr/lib/python3.5/xmlrpc/client.py", line 523, in __dump f(self, value, write) File "/usr/lib/python3.5/xmlrpc/client.py", line 527, in dump_nil raise TypeError("cannot marshal None unless allow_none is enabled") TypeError: cannot marshal None unless allow_none is enabled
Sadly, gandyn does not support the latest Gandi inteface and RESTful API : LiveDNS.
Instead of forking your code an breaking almost everything, I created a new project dyn-gandi
doing almost the same thing, via the new API.
Give it a try if you wish, delete this "issue" if needed. I really wanted to send you a message first, but I cannot find it in the GitHub interface.
Thanks again for the many years of use ! (You are credited in my doc ^^)
Cheers !
Hi,
I have multiple DNS record who redirect to my server.
Is it possible to your script to modify all at once ?
Thank you
Hello,
when I execute your
sudo /usr/local/bin/gandyn.py --config /home/paul/gandyn/gandyn.conf
The log file is giving an error on the last line :
Mon, 30 Nov 2015 23:11:45 DEBUG DNS record IP address : 217.70.184.38
Mon, 30 Nov 2015 23:11:45 DEBUG Current public IP address : 86.199.105.167
Mon, 30 Nov 2015 23:11:45 ERROR An error occured using Gandi API : <Fault 581050: "Error on object : OBJECT_ZONE (CAUSE_NORIGHT) [PM13328-GANDI isn't allowed to modify zone 681838]">
I am a newbie with dns on gandi, I just acquire a domain with them, I've made this in the dns zone :
I have activated my prod api too and copy the key in gandyn.conf
Have you got an idea ? I have searched on google but no answers available...
Thank you :)
When I try to execute the "python3 setup.py install", I have the following stdout:
running install
running build
running build_py
running build_scripts
running install_lib
byte-compiling /opt/local/lib/python3.2/site-packages/ipretriever/adapter.py to adapter.cpython-32.pyc
Segmentation fault (core dumped)
Do you have any idea?
bruno
Hi
Does your script support ipv6 ?
Hi,
I want use your script to keep my server updated.
but I've got this in the log :
"Wed, 27 Mar 2013 17:38:22 ERROR An error occured using Gandi API : <Fault 501237: "Error on object : OBJECT_STRING (CAUSE_BADPARAMETER) [string '' does not match '^[a-z0-9]{24}$']"> "
I only create a conf file from your template and change my domain name.
btw, do I need a key fro the API_KEY = ''" , if yes, where can I got this key ?
Best regards
We can retriev our actual IP via:
dig +short myip.opendns.com @resolver1.opendns.com
It's easier, faster and more sure than a web site.
Don't work with ifconfig.me/ip in ipretriever since 11/28.
I change with ipecho.net.plain and work again
Hi,
I know when exactly my IP address change but sometimes gandyn can't connect to my DNS area.
$ tail gandyn.log
An error occured retrieving public IP address : URLError(ConnectionRefusedError(111, 'Connection refused'),)
I want to make a script to run again gandyn when it display ConnectionRefused but the return value is OK
$ echo $?
0
Why did I get '0' as no error when gandyn.log displays 'ConnectionRefusedError' ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.