mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-09 08:00:36 +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):
|
def filterStringValue(value, regex, replace=None):
|
||||||
"""
|
"""
|
||||||
Returns string value consisting only of chars satisfying supplied
|
Returns string value consisting only of chars satisfying supplied
|
||||||
regular expression
|
regular expression (note: it has to be in form [...])
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retVal = ""
|
return re.sub(regex.replace("[", "[^"), "", value or "")
|
||||||
|
|
||||||
if value:
|
|
||||||
for char in value:
|
|
||||||
if re.search(regex, char):
|
|
||||||
retVal += char
|
|
||||||
elif replace:
|
|
||||||
retVal += replace
|
|
||||||
|
|
||||||
return retVal
|
|
||||||
|
|
||||||
def filterControlChars(value):
|
def filterControlChars(value):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -18,7 +18,6 @@ from lib.core.common import calculateDeltaSeconds
|
||||||
from lib.core.common import clearConsoleLine
|
from lib.core.common import clearConsoleLine
|
||||||
from lib.core.common import dataToStdout
|
from lib.core.common import dataToStdout
|
||||||
from lib.core.common import extractRegexResult
|
from lib.core.common import extractRegexResult
|
||||||
from lib.core.common import filterStringValue
|
|
||||||
from lib.core.common import getConsoleWidth
|
from lib.core.common import getConsoleWidth
|
||||||
from lib.core.common import getUnicode
|
from lib.core.common import getUnicode
|
||||||
from lib.core.common import initTechnique
|
from lib.core.common import initTechnique
|
||||||
|
|
Loading…
Reference in New Issue
Block a user