Adding test check for --titles

This commit is contained in:
Miroslav Stampar
2026-01-08 23:47:06 +01:00
parent 65ce6ba4c9
commit e2534b3c36
5 changed files with 14 additions and 9 deletions

View File

@@ -178,7 +178,7 @@ class ReqHandler(BaseHTTPRequestHandler):
self.end_headers()
self.wfile.write(b"<!DOCTYPE html><html><head><title>vulnserver</title></head><body><h3>GET:</h3><a href='/?id=1'>link</a><hr><h3>POST:</h3><form method='post'>ID: <input type='text' name='id'><input type='submit' value='Submit'></form></body></html>")
else:
code, output = OK, ""
code, output = OK, "<body><html>"
try:
if self.params.get("echo", ""):
@@ -216,6 +216,11 @@ class ReqHandler(BaseHTTPRequestHandler):
else:
output += "no results found"
if not results:
output = "<title>No results</title>" + output
else:
output = "<title>Results</title>" + output
output += "</body></html>"
except Exception as ex:
code = INTERNAL_SERVER_ERROR