detect blocks that self-redirect
This commit is contained in:
parent
5804ad6145
commit
1395e7d6f6
1 changed files with 5 additions and 0 deletions
|
@ -71,6 +71,11 @@ def process_result(res, ip, check, opts: Options):
|
||||||
elif check.kind.startswith("bad"):
|
elif check.kind.startswith("bad"):
|
||||||
reason = "okay" if "NXDOMAIN" in res else "redirect"
|
reason = "okay" if "NXDOMAIN" in res else "redirect"
|
||||||
|
|
||||||
|
elif any(r == ip for r in res):
|
||||||
|
# server returned its own IP, must be a block, unless
|
||||||
|
# one of our checks actually contains a domain that also hosts a DNS.
|
||||||
|
reason = "block"
|
||||||
|
|
||||||
elif any(is_bogon(r) or is_block_target(r) for r in res):
|
elif any(is_bogon(r) or is_block_target(r) for r in res):
|
||||||
reason = "block"
|
reason = "block"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue