fix: check dig NS
This commit is contained in:
@@ -41,10 +41,10 @@ class Factory:
|
|||||||
msg = "dig is not installed"
|
msg = "dig is not installed"
|
||||||
raise FactoryError(msg)
|
raise FactoryError(msg)
|
||||||
try:
|
try:
|
||||||
output = subprocess.check_output([dig_bin, domain, "+short"]) # noqa: S603
|
output = subprocess.check_output([dig_bin, domain, "NS", "+short"]) # noqa: S603
|
||||||
return len(output) == 0
|
return len(output) == 0
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
return True
|
return False
|
||||||
|
|
||||||
def random_domain(self) -> str:
|
def random_domain(self) -> str:
|
||||||
k = 10000
|
k = 10000
|
||||||
|
|||||||
Reference in New Issue
Block a user