mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-31 03:03:16 +03:00
bug fix
This commit is contained in:
parent
f7eaffcec5
commit
107089c00b
|
@ -524,7 +524,7 @@ Thierry Zoller <thierry@zoller.lu>
|
||||||
for reporting a minor bug
|
for reporting a minor bug
|
||||||
|
|
||||||
1ndr4 joe <c0d3w4st3r@gmail.com>
|
1ndr4 joe <c0d3w4st3r@gmail.com>
|
||||||
for reporting a minor bug
|
for reporting a couple of bugs
|
||||||
|
|
||||||
abc abc <biedimc@gmx.net>
|
abc abc <biedimc@gmx.net>
|
||||||
for reporting a minor bug
|
for reporting a minor bug
|
||||||
|
|
|
@ -1957,27 +1957,31 @@ def getPartRun():
|
||||||
|
|
||||||
retVal = None
|
retVal = None
|
||||||
commonPartsDict = optDict["Enumeration"]
|
commonPartsDict = optDict["Enumeration"]
|
||||||
stack = [item[4][0] if isinstance(item[4], list) else '' for item in inspect.stack()]
|
|
||||||
reobj1 = getCompiledRegex('conf\.dbmsHandler\.([^(]+)\(\)')
|
|
||||||
reobj2 = getCompiledRegex('self\.(get[^(]+)\(\)')
|
|
||||||
|
|
||||||
# Goes backwards through the stack to find the conf.dbmsHandler method
|
try:
|
||||||
# calling this function
|
stack = [item[4][0] if isinstance(item[4], list) else '' for item in inspect.stack()]
|
||||||
for i in xrange(0, len(stack)-1):
|
|
||||||
for reobj in (reobj2, reobj1):
|
|
||||||
match = reobj.search(stack[i])
|
|
||||||
|
|
||||||
if match:
|
# Goes backwards through the stack to find the conf.dbmsHandler method
|
||||||
# This is the calling conf.dbmsHandler or self method
|
# calling this function
|
||||||
# (e.g. 'getDbms')
|
for i in xrange(0, len(stack)-1):
|
||||||
retVal = match.groups()[0]
|
for regex in (getCompiledRegex('self\.(get[^(]+)\(\)'), getCompiledRegex('conf\.dbmsHandler\.([^(]+)\(\)')):
|
||||||
|
match = regex.search(stack[i])
|
||||||
|
|
||||||
|
if match:
|
||||||
|
# This is the calling conf.dbmsHandler or self method
|
||||||
|
# (e.g. 'getDbms')
|
||||||
|
retVal = match.groups()[0]
|
||||||
|
break
|
||||||
|
|
||||||
|
if retVal is not None:
|
||||||
break
|
break
|
||||||
|
|
||||||
if retVal is not None:
|
# Reference: http://coding.derkeiler.com/Archive/Python/comp.lang.python/2004-06/2267.html
|
||||||
break
|
except TypeError:
|
||||||
|
pass
|
||||||
|
|
||||||
# Return the INI tag to consider for common outputs (e.g. 'Databases')
|
# Return the INI tag to consider for common outputs (e.g. 'Databases')
|
||||||
return commonPartsDict[retVal][1] if retVal in commonPartsDict else retVal
|
return commonPartsDict[retVal][1] if isinstance(commonPartsDict.get(retVal), tuple) else retVal
|
||||||
|
|
||||||
def getUnicode(value, encoding=None, system=False):
|
def getUnicode(value, encoding=None, system=False):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user