mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
Adding new common function for further refactoring
This commit is contained in:
parent
65c55a6a49
commit
0e86175342
|
@ -3291,6 +3291,24 @@ def isNumber(value):
|
|||
else:
|
||||
return True
|
||||
|
||||
def zeroDepthSearch(expression, value):
|
||||
"""
|
||||
Searches occurances of value inside expression at 0-depth level
|
||||
regarding the parentheses
|
||||
"""
|
||||
retVal = []
|
||||
|
||||
depth = 0
|
||||
for index in xrange(len(expression)):
|
||||
if expression[index] == '(':
|
||||
depth += 1
|
||||
elif expression[index] == ')':
|
||||
depth -= 1
|
||||
elif depth == 0 and expression[index:index + len(value)] == value:
|
||||
retVal.append(index)
|
||||
|
||||
return retVal
|
||||
|
||||
def pollProcess(process, suppress_errors=False):
|
||||
while True:
|
||||
dataToStdout(".")
|
||||
|
|
Loading…
Reference in New Issue
Block a user