generated from nathanwoodburn/python-webserver-template
fix: Validation for negative responses
All checks were successful
Build Docker / BuildImage (push) Successful in 38s
All checks were successful
Build Docker / BuildImage (push) Successful in 38s
This commit is contained in:
2
tools.py
2
tools.py
@@ -167,7 +167,7 @@ def validate_dnssec(domain):
|
||||
# delv @194.50.5.28 -a hsd-ksk nathan.woodburn A +rtrace +vtrace
|
||||
command = f"delv @{resolverIP} -a hsd-ksk {domain} A +rtrace +vtrace"
|
||||
result = subprocess.run(command, shell=True, capture_output=True, text=True)
|
||||
if "; fully validated" in result.stdout:
|
||||
if "; fully validated" in result.stdout or "; negative response, fully validated" in result.stdout:
|
||||
return {"valid": True, "message": "DNSSEC is valid", "output": result.stderr + result.stdout}
|
||||
else:
|
||||
return {"valid": False, "message": "DNSSEC is not valid", "output": result.stderr + result.stdout}
|
||||
Reference in New Issue
Block a user