From 0a0c696e849032d5c50d16163c89c35aa4647bd4 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 18 Nov 2019 11:57:06 +0100 Subject: [PATCH] Minor update --- extra/vulnserver/vulnserver.py | 9 ++++++++- lib/core/settings.py | 2 +- lib/core/testing.py | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/extra/vulnserver/vulnserver.py b/extra/vulnserver/vulnserver.py index aa43a4cce..61174a350 100644 --- a/extra/vulnserver/vulnserver.py +++ b/extra/vulnserver/vulnserver.py @@ -139,17 +139,24 @@ class ReqHandler(BaseHTTPRequestHandler): self.end_headers() try: + output = "" + + if self.params.get("echo", ""): + output += "%s
" % self.params["echo"] + with _lock: _cursor.execute("SELECT * FROM users WHERE id=%s LIMIT 0, 1" % self.params.get("id", "")) results = _cursor.fetchall() - output = "SQL results:\n" + output += "SQL results:\n" output += "\n" + for row in results: output += "" for value in row: output += "" % value output += "\n" + output += "
%s
\n" output += "" except Exception as ex: diff --git a/lib/core/settings.py b/lib/core/settings.py index db37bd449..2238079c5 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.11.76" +VERSION = "1.3.11.77" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/lib/core/testing.py b/lib/core/testing.py index c3ae90619..42981fc11 100644 --- a/lib/core/testing.py +++ b/lib/core/testing.py @@ -65,6 +65,7 @@ def vulnTest(): TESTS = ( ("-r --flush-session", ("CloudFlare",)), + ("-u '&echo=foobar*' --flush-session", ("might be vulnerable to cross-site scripting",)), ("-u --flush-session --forms --crawl=2 --banner", ("total of 2 targets", "might be injectable", "Type: UNION query", "banner: '3")), ("-u --flush-session --data='{\"id\": 1}' --banner", ("might be injectable", "3 columns", "Payload: {\"id\"", "Type: boolean-based blind", "Type: time-based blind", "Type: UNION query", "banner: '3")), ("-u --flush-session --data='' --union-char=1 --mobile --banner --smart", ("might be injectable", "Payload: