Skip to content

Instantly share code, notes, and snippets.

@plaetzchen
Last active December 17, 2015 08:49
Show Gist options
  • Save plaetzchen/5582584 to your computer and use it in GitHub Desktop.
Save plaetzchen/5582584 to your computer and use it in GitHub Desktop.
This are a collection of python scripts to use a little server and a fritzbox to set NS entries on inwx.de
[live]
url = https://api.domrobot.com/xmlrpc/
username = username
password = password
[ote]
url = https://api.ote.domrobot.com/xmlrpc/
username = your_ote_username
password = your_ote_password
from bottle import route, run, get, request
from inwx import domrobot
from configuration import get_account_data
PASSWORD = "blafoo"
@route('/')
def index():
newip = request.query.newip
remotePassword = request.query.password
if remotePassword == PASSWORD:
api_url, username, password = get_account_data(True)
inwx_conn = domrobot(api_url, False)
loginRet = inwx_conn.account.login({'lang': 'en', 'user': username, 'pass': password})
inwx_conn.nameserver.updateRecord({'id':'1234567','content':newip})
return 'Updated IP to ', newip
else:
return 'No.'
run(host='0.0.0.0', port=8080, debug=False)
bottle==0.11.6
wsgiref==0.1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment