A little noip ddns api for python.
- socket
- requests
- cryptography
- BeautifulSoup4
loginfunction logs you in with your username and passwordsaveLoginInfofunction save your username and password encrypted in noip.config fileloadLoginInfofunction loads your username and password from noip.config filegetCurrentfunction returns current ip saved in your hostnamesetDNSfunction sets given ip to your hostnamegetMyIPfunction returns your current public ip addresstestOpenPortfunction returns if your port is open, closed or filtered(when the routers firewall is blocking it)
import noip_api
username = ""
password = ""
hostname = ""
DDNS = noip_api.noip(hostname)
DDNS.login(username=username, password=password)
print(DDNS.getMyIP())
print(DDNS.getCurrent())
DDNS.setDNS(ip=DDNS.getMyIP())import noip_api
username = ""
password = ""
hostname = ""
DDNS = noip_api.noip(hostname)
DDNS.saveLoginInfo(username=username, password=password)import noip_api
username = ""
password = ""
hostname = ""
DDNS = noip_api.noip(hostname)
DDNS.loadLoginInfo()
DDNS.setDNS(ip=DDNS.getMyIP())