mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-08 13:41:29 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29f09e235c | ||
|
|
67ab79a625 | ||
|
|
de66b69f41 | ||
|
|
acce97bfcb |
@@ -891,7 +891,7 @@ class Agent(object):
|
|||||||
if element > 0:
|
if element > 0:
|
||||||
unionQuery += ','
|
unionQuery += ','
|
||||||
|
|
||||||
if conf.uValues:
|
if conf.uValues and conf.uValues.count(',') + 1 == count:
|
||||||
unionQuery += conf.uValues.split(',')[element]
|
unionQuery += conf.uValues.split(',')[element]
|
||||||
elif element == position:
|
elif element == position:
|
||||||
unionQuery += query
|
unionQuery += query
|
||||||
|
|||||||
@@ -929,7 +929,7 @@ def _setPreprocessFunctions():
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
function(_urllib.request.Request("http://localhost"))
|
function(_urllib.request.Request("http://localhost"))
|
||||||
except:
|
except Exception as ex:
|
||||||
tbMsg = traceback.format_exc()
|
tbMsg = traceback.format_exc()
|
||||||
|
|
||||||
if conf.debug:
|
if conf.debug:
|
||||||
@@ -943,8 +943,8 @@ def _setPreprocessFunctions():
|
|||||||
|
|
||||||
errMsg = "function 'preprocess(req)' "
|
errMsg = "function 'preprocess(req)' "
|
||||||
errMsg += "in preprocess script '%s' " % script
|
errMsg += "in preprocess script '%s' " % script
|
||||||
errMsg += "appears to be invalid "
|
errMsg += "had issues in a test run ('%s'). " % getSafeExString(ex)
|
||||||
errMsg += "(Note: find template script at '%s')" % filename
|
errMsg += "You can find a template script at '%s'" % filename
|
||||||
raise SqlmapGenericException(errMsg)
|
raise SqlmapGenericException(errMsg)
|
||||||
|
|
||||||
def _setPostprocessFunctions():
|
def _setPostprocessFunctions():
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ from thirdparty import six
|
|||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# 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 = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
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)
|
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]
|
conf.httpHeaders = [_ for _ in conf.httpHeaders if _[1] != contentType]
|
||||||
contentType = POST_HINT_CONTENT_TYPES.get(kb.postHint, PLAIN_TEXT_CONTENT_TYPE)
|
contentType = POST_HINT_CONTENT_TYPES.get(kb.postHint, PLAIN_TEXT_CONTENT_TYPE)
|
||||||
conf.httpHeaders.append((HTTP_HEADER.CONTENT_TYPE, contentType))
|
conf.httpHeaders.append((HTTP_HEADER.CONTENT_TYPE, contentType))
|
||||||
|
if "urlencoded" in contentType:
|
||||||
|
postUrlEncode = True
|
||||||
|
|
||||||
if payload:
|
if payload:
|
||||||
delimiter = conf.paramDel or (DEFAULT_GET_POST_DELIMITER if place != PLACE.COOKIE else DEFAULT_COOKIE_DELIMITER)
|
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):
|
def execute(self, query):
|
||||||
retVal = False
|
retVal = False
|
||||||
|
|
||||||
|
# Reference: https://stackoverflow.com/a/69491015
|
||||||
|
if hasattr(_sqlalchemy, "text"):
|
||||||
|
query = _sqlalchemy.text(query)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.cursor = self.connector.execute(query)
|
self.cursor = self.connector.execute(query)
|
||||||
retVal = True
|
retVal = True
|
||||||
|
|||||||
Reference in New Issue
Block a user