mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
layout adjustment
This commit is contained in:
@@ -1357,6 +1357,7 @@ def safeStringFormat(formatStr, params):
|
|||||||
retVal = retVal[:index] + getUnicode(params[count]) + retVal[index+2:]
|
retVal = retVal[:index] + getUnicode(params[count]) + retVal[index+2:]
|
||||||
else:
|
else:
|
||||||
raise sqlmapNoneDataException, "wrong number of parameters during string formatting"
|
raise sqlmapNoneDataException, "wrong number of parameters during string formatting"
|
||||||
|
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
@@ -1364,10 +1365,12 @@ def safeStringFormat(formatStr, params):
|
|||||||
def sanitizeAsciiString(subject):
|
def sanitizeAsciiString(subject):
|
||||||
if subject:
|
if subject:
|
||||||
index = None
|
index = None
|
||||||
|
|
||||||
for i in xrange(len(subject)):
|
for i in xrange(len(subject)):
|
||||||
if ord(subject[i]) >= 128:
|
if ord(subject[i]) >= 128:
|
||||||
index = i
|
index = i
|
||||||
break
|
break
|
||||||
|
|
||||||
if index is None:
|
if index is None:
|
||||||
return subject
|
return subject
|
||||||
else:
|
else:
|
||||||
@@ -1380,6 +1383,7 @@ def getFilteredPageContent(page, onlyText=True):
|
|||||||
|
|
||||||
if isinstance(page, basestring):
|
if isinstance(page, basestring):
|
||||||
retVal = re.sub(r"(?s)<script.+?</script>|<!--.+?-->|<style.+?</style>%s" % (r"|<[^>]+>|\t|\n|\r" if onlyText else ""), " ", page)
|
retVal = re.sub(r"(?s)<script.+?</script>|<!--.+?-->|<style.+?</style>%s" % (r"|<[^>]+>|\t|\n|\r" if onlyText else ""), " ", page)
|
||||||
|
|
||||||
while retVal.find(" ") != -1:
|
while retVal.find(" ") != -1:
|
||||||
retVal = retVal.replace(" ", " ")
|
retVal = retVal.replace(" ", " ")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user