From b3dc60b7ca08a38b7612796a4000557f8f15f28c Mon Sep 17 00:00:00 2001 From: Galonza Peter Date: Sun, 24 Oct 2021 12:05:14 +0300 Subject: [PATCH] fixed check ipv6 dns --- src/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dashboard.py b/src/dashboard.py index 9addd11..15b7572 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -96,7 +96,7 @@ def check_DNS(dns): dns = dns.replace(' ','').split(',') status = True for i in dns: - if not (regex_match("((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}", i) or regex_match("(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z][a-z]{0,61}[a-z]",i)): + if not (check_IP(dns) or regex_match("(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z][a-z]{0,61}[a-z]",i)): return False return True