mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-06-09 17:51:33 +00:00
some more optimization
This commit is contained in:
parent
2ed3efba12
commit
e94efff187
2 changed files with 2 additions and 12 deletions
|
|
@ -2433,19 +2433,10 @@ def removeDynamicContent(page):
|
|||
def filterStringValue(value, regex, replace=None):
|
||||
"""
|
||||
Returns string value consisting only of chars satisfying supplied
|
||||
regular expression
|
||||
regular expression (note: it has to be in form [...])
|
||||
"""
|
||||
|
||||
retVal = ""
|
||||
|
||||
if value:
|
||||
for char in value:
|
||||
if re.search(regex, char):
|
||||
retVal += char
|
||||
elif replace:
|
||||
retVal += replace
|
||||
|
||||
return retVal
|
||||
return re.sub(regex.replace("[", "[^"), "", value or "")
|
||||
|
||||
def filterControlChars(value):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue