mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +03:00
speedup of UNION dumping
This commit is contained in:
parent
1ae413a206
commit
4a1a0773b7
|
@ -1328,7 +1328,7 @@ def getRange(count, dump=False, plusOne=False):
|
|||
|
||||
return indexRange
|
||||
|
||||
def parseUnionPage(output, expression, partial=False, unique=True):
|
||||
def parseUnionPage(output, unique=True):
|
||||
if output is None:
|
||||
return None
|
||||
|
||||
|
@ -1336,10 +1336,12 @@ def parseUnionPage(output, expression, partial=False, unique=True):
|
|||
|
||||
if output.startswith(kb.chars.start) and output.endswith(kb.chars.stop):
|
||||
regExpr = '%s(.*?)%s' % (kb.chars.start, kb.chars.stop)
|
||||
output = re.findall(regExpr, output, re.DOTALL | re.IGNORECASE)
|
||||
output = re.finditer(regExpr, output, re.DOTALL | re.IGNORECASE)
|
||||
_ = set()
|
||||
|
||||
for entry in output:
|
||||
entry = entry.group(1)
|
||||
|
||||
if unique:
|
||||
key = entry.lower()
|
||||
if key not in _:
|
||||
|
|
|
@ -384,7 +384,7 @@ def __goInband(expression, expected=None, unique=True, resumeValue=True, unpack=
|
|||
if isinstance(output, list):
|
||||
data = output
|
||||
else:
|
||||
data = parseUnionPage(output, expression, partial, unique)
|
||||
data = parseUnionPage(output, unique)
|
||||
|
||||
return data
|
||||
|
||||
|
|
|
@ -233,13 +233,13 @@ def unionUse(expression, unpack=True, dump=False):
|
|||
countedExpression = countedExpression[:untilOrderChar]
|
||||
|
||||
count = resume(countedExpression, None)
|
||||
count = parseUnionPage(count, countedExpression)
|
||||
count = parseUnionPage(count)
|
||||
|
||||
if not count or not count.isdigit():
|
||||
output = __oneShotUnionUse(countedExpression, unpack)
|
||||
|
||||
if output:
|
||||
count = parseUnionPage(output, countedExpression)
|
||||
count = parseUnionPage(output)
|
||||
|
||||
if isNumPosStrValue(count):
|
||||
if isinstance(stopLimit, int) and stopLimit > 0:
|
||||
|
|
Loading…
Reference in New Issue
Block a user