Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions python/http_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,15 @@ def main():
print(f"[!] Invalid URL structure: '{url_to_test}'", file=sys.stderr)
sys.exit(1)

# Validate URL scheme - only allow http and https
final_parsed = urllib.parse.urlparse(url_to_test)
if final_parsed.scheme and final_parsed.scheme.lower() not in ("http", "https"):
print(
f"[!] Error: Only http:// and https:// URLs are supported. Got scheme '{final_parsed.scheme}': '{url_to_test}'",
file=sys.stderr,
)
sys.exit(1)

check_url_features(url_to_test)


Expand Down