also allow ip lookups in scan

This commit is contained in:
overcuriousity
2025-09-15 21:00:57 +02:00
parent c076ee028f
commit e2d4e12057
5 changed files with 108 additions and 106 deletions

View File

@@ -48,3 +48,15 @@ def _is_valid_ip(ip: str) -> bool:
except (ValueError, AttributeError):
return False
def is_valid_target(target: str) -> bool:
"""
Checks if the target is a valid domain or IP address.
Args:
target: The target string to validate.
Returns:
True if the target is a valid domain or IP, False otherwise.
"""
return _is_valid_domain(target) or _is_valid_ip(target)