mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-02-03 12:06:37 +00:00
Adding test check for --titles
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user