mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
some more optimization
This commit is contained in:
parent
2ed3efba12
commit
e94efff187
|
@ -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):
|
||||
"""
|
||||
|
|
|
@ -18,7 +18,6 @@ from lib.core.common import calculateDeltaSeconds
|
|||
from lib.core.common import clearConsoleLine
|
||||
from lib.core.common import dataToStdout
|
||||
from lib.core.common import extractRegexResult
|
||||
from lib.core.common import filterStringValue
|
||||
from lib.core.common import getConsoleWidth
|
||||
from lib.core.common import getUnicode
|
||||
from lib.core.common import initTechnique
|
||||
|
|
Loading…
Reference in New Issue
Block a user