mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
update of dynamicity engine
This commit is contained in:
parent
ee4e04ebca
commit
70e87d959e
|
@ -21,6 +21,7 @@ from lib.core.common import randomInt
|
||||||
from lib.core.common import randomStr
|
from lib.core.common import randomStr
|
||||||
from lib.core.common import readInput
|
from lib.core.common import readInput
|
||||||
from lib.core.common import showStaticWords
|
from lib.core.common import showStaticWords
|
||||||
|
from lib.core.common import trimAlphaNum
|
||||||
from lib.core.common import wasLastRequestDBMSError
|
from lib.core.common import wasLastRequestDBMSError
|
||||||
from lib.core.common import DynamicContentItem
|
from lib.core.common import DynamicContentItem
|
||||||
from lib.core.data import conf
|
from lib.core.data import conf
|
||||||
|
@ -435,11 +436,8 @@ def checkDynamicContent(firstPage, secondPage):
|
||||||
if suffix is None and (blocks[i][0] + blocks[i][2] >= len(firstPage)):
|
if suffix is None and (blocks[i][0] + blocks[i][2] >= len(firstPage)):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
while prefix and prefix[-1].isalnum():
|
prefix = trimAlphaNum(prefix)
|
||||||
prefix = prefix[:-1]
|
suffix = trimAlphaNum(suffix)
|
||||||
|
|
||||||
while suffix and suffix[0].isalnum():
|
|
||||||
suffix = suffix[1:]
|
|
||||||
|
|
||||||
kb.dynamicMarkings.append((re.escape(prefix[-conf.dynMarkLength:]) if prefix else None, re.escape(suffix[:conf.dynMarkLength]) if suffix else None))
|
kb.dynamicMarkings.append((re.escape(prefix[-conf.dynMarkLength:]) if prefix else None, re.escape(suffix[:conf.dynMarkLength]) if suffix else None))
|
||||||
|
|
||||||
|
|
|
@ -1627,3 +1627,15 @@ def extractRegexResult(regex, content, flags=0):
|
||||||
retVal = match.group("result")
|
retVal = match.group("result")
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
def trimAlphaNum(value):
|
||||||
|
"""
|
||||||
|
Trims alpha numeric characters from start and ending of a given value
|
||||||
|
"""
|
||||||
|
while value and value[-1].isalnum():
|
||||||
|
value = value[:-1]
|
||||||
|
|
||||||
|
while value and value[0].isalnum():
|
||||||
|
value = value[1:]
|
||||||
|
|
||||||
|
return value
|
||||||
|
|
Loading…
Reference in New Issue
Block a user