Compare commits

..

4 Commits

Author SHA1 Message Date
Miroslav Stampar
29f09e235c Fixes #5576 2023-12-01 11:26:52 +01:00
Miroslav Stampar
67ab79a625 Fixes #5574 2023-11-24 01:39:24 +01:00
Miroslav Stampar
de66b69f41 Fixes #5566 2023-11-12 20:38:47 +01:00
Miroslav Stampar
acce97bfcb Patch related to the #5567 2023-11-12 20:25:42 +01:00
5 changed files with 11 additions and 5 deletions

View File

@@ -891,7 +891,7 @@ class Agent(object):
if element > 0:
unionQuery += ','
if conf.uValues:
if conf.uValues and conf.uValues.count(',') + 1 == count:
unionQuery += conf.uValues.split(',')[element]
elif element == position:
unionQuery += query

View File

@@ -929,7 +929,7 @@ def _setPreprocessFunctions():
else:
try:
function(_urllib.request.Request("http://localhost"))
except:
except Exception as ex:
tbMsg = traceback.format_exc()
if conf.debug:
@@ -943,8 +943,8 @@ def _setPreprocessFunctions():
errMsg = "function 'preprocess(req)' "
errMsg += "in preprocess script '%s' " % script
errMsg += "appears to be invalid "
errMsg += "(Note: find template script at '%s')" % filename
errMsg += "had issues in a test run ('%s'). " % getSafeExString(ex)
errMsg += "You can find a template script at '%s'" % filename
raise SqlmapGenericException(errMsg)
def _setPostprocessFunctions():

View File

@@ -20,7 +20,7 @@ from thirdparty import six
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.7.11.0"
VERSION = "1.7.12.0"
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)

View File

@@ -1030,6 +1030,8 @@ class Connect(object):
conf.httpHeaders = [_ for _ in conf.httpHeaders if _[1] != contentType]
contentType = POST_HINT_CONTENT_TYPES.get(kb.postHint, PLAIN_TEXT_CONTENT_TYPE)
conf.httpHeaders.append((HTTP_HEADER.CONTENT_TYPE, contentType))
if "urlencoded" in contentType:
postUrlEncode = True
if payload:
delimiter = conf.paramDel or (DEFAULT_GET_POST_DELIMITER if place != PLACE.COOKIE else DEFAULT_COOKIE_DELIMITER)

View File

@@ -116,6 +116,10 @@ class SQLAlchemy(GenericConnector):
def execute(self, query):
retVal = False
# Reference: https://stackoverflow.com/a/69491015
if hasattr(_sqlalchemy, "text"):
query = _sqlalchemy.text(query)
try:
self.cursor = self.connector.execute(query)
retVal = True