mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29f09e235c | ||
|
|
67ab79a625 | ||
|
|
de66b69f41 | ||
|
|
acce97bfcb |
@@ -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
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user