diff options
Diffstat (limited to 'simpleddns.py')
-rwxr-xr-x | simpleddns.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/simpleddns.py b/simpleddns.py index 9434be6..45d9e89 100755 --- a/simpleddns.py +++ b/simpleddns.py @@ -47,12 +47,12 @@ def setup_config() -> None: return config_path.unlink() default_get_ip = 'curl --no-progress-meter ifconfig.co' - get_ip = input(f'Command for getting IP address [default: {default_get_ip}]? ').strip() - if not get_ip: - get_ip = default_get_ip domain_name = input('Domain name? ').strip() if not domain_name: fatal_error('Domain name must be set') + get_ip = input(f'Command for getting IP address [default: {default_get_ip}]? ').strip() + if not get_ip: + get_ip = default_get_ip if any(c.isspace() for c in domain_name): fatal_error('Domain name must not contain any whitespace') print('1. Linode Domains') @@ -81,7 +81,7 @@ if os.name == 'posix': config_mode = config_path.stat().st_mode if config_mode & 0o4: fatal_error(f'''DANGER: configuration file {config_path} allows -reading by other users (mode {config_mode}). +reading by other users (mode {config_mode & 0o777:o}). If there are API tokens in there, revoke them immediately!!''') class Domain(ABC): |