From 9a6f9f69859fb92febe20acf3246ee53f367b37d Mon Sep 17 00:00:00 2001 From: meemo Date: Sun, 6 Feb 2022 19:04:20 -0500 Subject: [PATCH] 3 character padding, not 2 --- sudomemoDNS.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sudomemoDNS.py b/sudomemoDNS.py index 4948569..53ba036 100644 --- a/sudomemoDNS.py +++ b/sudomemoDNS.py @@ -33,7 +33,7 @@ SUDOMEMODNS_VERSION = "1.2" # e.g `1.1.1.1` becomes `001.001.001.001` def format_ip(address): octets = str(address).split(".") - return f"{int(octets[0]):02d}.{int(octets[1]):02d}.{int(octets[2]):02d}.{int(octets[3]):02d}" + return f"{int(octets[0]):03d}.{int(octets[1]):03d}.{int(octets[2]):03d}.{int(octets[3]):03d}" def get_ip(): @@ -67,7 +67,7 @@ print("First, make sure that your console is connected to the same network as th print("Then, put these settings in for DNS on your console:") print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") -print(f"Primary DNS: {MY_IP}") +print(f"Primary DNS: {format_ip(MY_IP)}") print("Secondary DNS: 008.008.008.008") print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n")