mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
minor refactoring and trivial bug fix
This commit is contained in:
parent
e439c3d3f5
commit
477c66ac4b
|
@ -90,22 +90,22 @@ class Dump(object):
|
||||||
def string(self, header, data, content_type=None, sort=True):
|
def string(self, header, data, content_type=None, sort=True):
|
||||||
kb.stickyLevel = None
|
kb.stickyLevel = None
|
||||||
|
|
||||||
|
if hasattr(conf, "api"):
|
||||||
|
self._write(data, content_type=content_type)
|
||||||
|
return
|
||||||
|
|
||||||
if isListLike(data):
|
if isListLike(data):
|
||||||
self.lister(header, data, sort)
|
self.lister(header, data, content_type, sort)
|
||||||
elif data is not None:
|
elif data is not None:
|
||||||
_ = getUnicode(data)
|
_ = getUnicode(data)
|
||||||
|
|
||||||
if _ and _[-1] == '\n':
|
if _ and _[-1] == '\n':
|
||||||
_ = _[:-1]
|
_ = _[:-1]
|
||||||
|
|
||||||
if hasattr(conf, "api"):
|
if "\n" in _:
|
||||||
self._write(data, content_type=content_type)
|
|
||||||
elif "\n" in _:
|
|
||||||
self._write("%s:\n---\n%s\n---" % (header, _))
|
self._write("%s:\n---\n%s\n---" % (header, _))
|
||||||
else:
|
else:
|
||||||
self._write("%s: %s" % (header, ("'%s'" % _) if isinstance(data, basestring) else _))
|
self._write("%s: %s" % (header, ("'%s'" % _) if isinstance(data, basestring) else _))
|
||||||
elif hasattr(conf, "api"):
|
|
||||||
self._write(data, content_type=content_type)
|
|
||||||
else:
|
else:
|
||||||
self._write("%s:\tNone" % header)
|
self._write("%s:\tNone" % header)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user