From adbc4bae5d39040bade0f5ee9b98007e7d320472 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 6 Nov 2019 12:54:18 +0100 Subject: [PATCH] Update of vuln tests --- extra/vulnserver/vulnserver.py | 7 +++++++ lib/core/settings.py | 2 +- lib/core/testing.py | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/extra/vulnserver/vulnserver.py b/extra/vulnserver/vulnserver.py index 8354c691b..a146b15fb 100644 --- a/extra/vulnserver/vulnserver.py +++ b/extra/vulnserver/vulnserver.py @@ -110,6 +110,13 @@ class ReqHandler(BaseHTTPRequestHandler): for name in self.headers: params[name.lower()] = self.headers[name] + if "cookie" in params: + for part in params["cookie"].split(';'): + part = part.strip() + if '=' in part: + name, value = part.split('=', 1) + params[name.strip()] = unquote_plus(value.strip()) + for key in params: if params[key] and isinstance(params[key], (tuple, list)): params[key] = params[key][-1] diff --git a/lib/core/settings.py b/lib/core/settings.py index 574ac698d..35a9e0847 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.9" +VERSION = "1.3.11.10" 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 6b6dfe04c..867b66238 100644 --- a/lib/core/testing.py +++ b/lib/core/testing.py @@ -66,7 +66,8 @@ def vulnTest(): ("--flush-session --data='{\"id\": 1}' --banner", ("Payload: {\"id\"", "banner: '3")), ("--flush-session --data='' --banner", ("Payload: 3\"", ("banner: '3", "INTEGER", "TEXT", "id", "name", "surname", "2 entries", "6E616D6569736E756C6C")), ("--all --tamper=between,randomcase", ("5 entries", "luther", "blisset", "fluffy", "179ad45c6ce2cb97cf1029e212046e81", "NULL", "nameisnull", "testpass")), ("-z \"tec=B\" --hex --fresh-queries --threads=4 --sql-query=\"SELECT 987654321\"", ("length of query output", ": '987654321'",)),