mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Fixes #1639
This commit is contained in:
parent
b427f6c03e
commit
e3650342bd
|
@ -8,6 +8,7 @@ See the file 'doc/COPYING' for copying permission
|
||||||
import base64
|
import base64
|
||||||
import json
|
import json
|
||||||
import pickle
|
import pickle
|
||||||
|
import re
|
||||||
import StringIO
|
import StringIO
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
|
@ -159,6 +160,7 @@ def htmlunescape(value):
|
||||||
if value and isinstance(value, basestring):
|
if value and isinstance(value, basestring):
|
||||||
codes = (('<', '<'), ('>', '>'), ('"', '"'), (' ', ' '), ('&', '&'))
|
codes = (('<', '<'), ('>', '>'), ('"', '"'), (' ', ' '), ('&', '&'))
|
||||||
retVal = reduce(lambda x, y: x.replace(y[0], y[1]), codes, retVal)
|
retVal = reduce(lambda x, y: x.replace(y[0], y[1]), codes, retVal)
|
||||||
|
retVal = re.sub(r"&#x([^;]+);", lambda match: chr(int(match.group(1), 16)), retVal)
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def singleTimeWarnMessage(message): # Cross-linked function
|
def singleTimeWarnMessage(message): # Cross-linked function
|
||||||
|
|
|
@ -197,11 +197,6 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
|
||||||
_ = "%s(?P<result>.*?)%s" % (kb.chars.start, kb.chars.stop)
|
_ = "%s(?P<result>.*?)%s" % (kb.chars.start, kb.chars.stop)
|
||||||
retVal = extractRegexResult(_, retVal, re.DOTALL | re.IGNORECASE) or retVal
|
retVal = extractRegexResult(_, retVal, re.DOTALL | re.IGNORECASE) or retVal
|
||||||
|
|
||||||
try:
|
|
||||||
retVal = re.sub(r"&#x([^;]+);", lambda match: chr(int(match.group(1), 16)), retVal)
|
|
||||||
except ValueError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
return safecharencode(retVal) if kb.safeCharEncode else retVal
|
return safecharencode(retVal) if kb.safeCharEncode else retVal
|
||||||
|
|
||||||
def _errorFields(expression, expressionFields, expressionFieldsList, num=None, emptyFields=None, suppressOutput=False):
|
def _errorFields(expression, expressionFields, expressionFieldsList, num=None, emptyFields=None, suppressOutput=False):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user