mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
Fix for Issue #47
This commit is contained in:
parent
21d9ae0a2c
commit
d7cd55fb28
|
@ -833,17 +833,6 @@ def checkFile(filename):
|
|||
if not os.path.exists(filename):
|
||||
raise sqlmapFilePathException, "unable to read file '%s'" % filename
|
||||
|
||||
def restoreDumpMarkedChars(value, onlyNewlineTab=False):
|
||||
retVal = value
|
||||
|
||||
if isinstance(retVal, basestring):
|
||||
retVal = retVal.replace(DUMP_NEWLINE_MARKER, "\n").replace(DUMP_CR_MARKER, "\r").replace(DUMP_TAB_MARKER, "\t")
|
||||
|
||||
if not onlyNewlineTab:
|
||||
retVal = retVal.replace(DUMP_DEL_MARKER, ", ")
|
||||
|
||||
return retVal
|
||||
|
||||
def banner():
|
||||
"""
|
||||
This function prints sqlmap banner with its version
|
||||
|
|
|
@ -19,7 +19,6 @@ from lib.core.common import isListLike
|
|||
from lib.core.common import normalizeUnicode
|
||||
from lib.core.common import openFile
|
||||
from lib.core.common import prioritySortColumns
|
||||
from lib.core.common import restoreDumpMarkedChars
|
||||
from lib.core.common import safeCSValue
|
||||
from lib.core.common import unsafeSQLIdentificatorNaming
|
||||
from lib.core.data import conf
|
||||
|
@ -60,9 +59,6 @@ class Dump:
|
|||
|
||||
kb.dataOutputFlag = True
|
||||
|
||||
def _formatString(self, inpStr):
|
||||
return restoreDumpMarkedChars(getUnicode(inpStr))
|
||||
|
||||
def setOutputFile(self):
|
||||
self._outputFile = "%s%slog" % (conf.outputPath, os.sep)
|
||||
self._outputFP = codecs.open(self._outputFile, "ab", UNICODE_ENCODING)
|
||||
|
@ -74,7 +70,7 @@ class Dump:
|
|||
if isListLike(data):
|
||||
self.lister(header, data, sort)
|
||||
elif data:
|
||||
data = self._formatString(getUnicode(data))
|
||||
data = getUnicode(data)
|
||||
|
||||
if data[-1] == '\n':
|
||||
data = data[:-1]
|
||||
|
|
|
@ -12,7 +12,6 @@ from xml.parsers.expat import ExpatError
|
|||
|
||||
from extra.prettyprint import prettyprint
|
||||
from lib.core.common import getUnicode
|
||||
from lib.core.common import restoreDumpMarkedChars
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
|
@ -125,7 +124,7 @@ class XMLDump:
|
|||
if data is None :
|
||||
return self.__doc.createTextNode(u'')
|
||||
else :
|
||||
escaped_data = saxutils.escape(self.__formatString(data), ENTITIES)
|
||||
escaped_data = saxutils.escape(data, ENTITIES)
|
||||
return self.__doc.createTextNode(escaped_data)
|
||||
|
||||
def __createAttribute(self,attrName,attrValue):
|
||||
|
@ -140,9 +139,6 @@ class XMLDump:
|
|||
attr.nodeValue = getUnicode(attrValue)
|
||||
return attr
|
||||
|
||||
def __formatString(self, inpStr):
|
||||
return restoreDumpMarkedChars(getUnicode(inpStr))
|
||||
|
||||
def string(self, header, data, sort=True):
|
||||
'''
|
||||
Adds string element to the xml.
|
||||
|
|
Loading…
Reference in New Issue
Block a user