mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Minor update of vuln tests
This commit is contained in:
parent
0a0c696e84
commit
5044894928
3 changed files with 8 additions and 4 deletions
|
|
@ -126,7 +126,7 @@ class ReqHandler(BaseHTTPRequestHandler):
|
|||
if self.url == '/':
|
||||
self.send_response(OK)
|
||||
|
||||
if "id" not in params:
|
||||
if not any(_ in self.params for _ in ("id", "query")):
|
||||
self.send_header("Content-type", "text/html")
|
||||
self.send_header("Connection", "close")
|
||||
self.end_headers()
|
||||
|
|
@ -145,7 +145,10 @@ class ReqHandler(BaseHTTPRequestHandler):
|
|||
output += "%s<br>" % self.params["echo"]
|
||||
|
||||
with _lock:
|
||||
_cursor.execute("SELECT * FROM users WHERE id=%s LIMIT 0, 1" % self.params.get("id", ""))
|
||||
if "query" in self.params:
|
||||
_cursor.execute(self.params["query"])
|
||||
elif "id" in self.params:
|
||||
_cursor.execute("SELECT * FROM users WHERE id=%s LIMIT 0, 1" % self.params["id"])
|
||||
results = _cursor.fetchall()
|
||||
|
||||
output += "<b>SQL results:</b>\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue