X-Git-Url: https://git.toastfreeware.priv.at/toast/tdyndns.git/blobdiff_plain/026b856d6d00092a7e998c328cda23b77ffd811e..8693ac19b712eeece371d48c4e2af3325386eb1b:/bin/tdyndns_update diff --git a/bin/tdyndns_update b/bin/tdyndns_update index ce0b73a..45c4264 100755 --- a/bin/tdyndns_update +++ b/bin/tdyndns_update @@ -55,8 +55,8 @@ def blockip_whitelist_add(ip): """ :param ip: ipv4 address :raises a BlockipError in case of errors.""" - command = "iptables -I blockip -s {ip} -j ACCEPT".format(ip=ip) - p = call(command, shell=True) + command = ['iptables', '-I', 'blockip', '-s', str(ip), '-j', 'ACCEPT'] + p = call(command) if p != 0: raise BlockipError(p) @@ -65,8 +65,8 @@ def blockip_whitelist_delete(ip): """ :param ip: ipv4 address :raises a BlockipError in case of errors.""" - command = "iptables -D blockip -s {ip} -j ACCEPT".format(ip=ip) - p = call(command, shell=True) + command = ['iptables', '-D', 'blockip', '-s', str(ip), '-j', 'ACCEPT'] + p = call(command) if p != 0: raise BlockipError(p)