Skip to content

Commit

Permalink
Added /..;/..;/ to force http bad request errors on tomcat version de…
Browse files Browse the repository at this point in the history
…tection.
  • Loading branch information
p0dalirius committed Mar 30, 2023
1 parent a2a6be6 commit 443f38f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apachetomcatscanner/utils/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ def get_version_from_malformed_http_request(url, config):
test_urls = [
url + "/{}",
url + "/" + "..;/" * url_depth + "{}",
url + "/..;/..;/",
]
test_urls = list(set(test_urls))
try:
for url in test_urls:
for test_url in test_urls:
if version is None:
r = requests.get(
url,
test_url,
timeout=config.request_timeout,
proxies=config.request_proxies,
verify=(not (config.request_no_check_certificate))
Expand Down

0 comments on commit 443f38f

Please sign in to comment.