mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
minor fix/adjustment regarding getCompiledRegex
This commit is contained in:
parent
ce29c841cf
commit
c431a74d9e
|
@ -1277,15 +1277,15 @@ def getGoodSamaritanParameters(part, prevValue, originalCharset):
|
|||
else:
|
||||
return None, None, originalCharset
|
||||
|
||||
def getCompiledRegex(regex, args=()):
|
||||
def getCompiledRegex(regex, *args):
|
||||
"""
|
||||
Returns compiled regular expression and stores it in cache for further usage
|
||||
"""
|
||||
if regex in __compiledRegularExpressions:
|
||||
return __compiledRegularExpressions[regex]
|
||||
if (regex, args) in __compiledRegularExpressions:
|
||||
return __compiledRegularExpressions[(regex, args)]
|
||||
else:
|
||||
retVal = re.compile(regex, *args)
|
||||
__compiledRegularExpressions[regex] = retVal
|
||||
__compiledRegularExpressions[(regex, args)] = retVal
|
||||
return retVal
|
||||
|
||||
def getPartRun():
|
||||
|
|
Loading…
Reference in New Issue
Block a user