MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / string

Method string

lib/core/dump.py:121–145  ·  view source on GitHub ↗
(self, header, data, content_type=None, sort=True)

Source from the content-addressed store, hash-verified

119 self._write(data, content_type=content_type)
120
121 def string(self, header, data, content_type=None, sort=True):
122 if conf.api:
123 self._write(data, content_type=content_type)
124
125 if isListLike(data) and len(data) == 1:
126 data = unArrayizeValue(data)
127
128 if isListLike(data):
129 self.lister(header, data, content_type, sort)
130 elif data is not None:
131 _ = getUnicode(data)
132
133 if _.endswith("\r\n"):
134 _ = _[:-2]
135
136 elif _.endswith("\n"):
137 _ = _[:-1]
138
139 if _.strip(' '):
140 _ = _.strip(' ')
141
142 if "\n" in _:
143 self._write("%s:\n---\n%s\n---" % (header, _))
144 else:
145 self._write("%s: %s" % (header, ("'%s'" % _) if isinstance(data, six.string_types) else _))
146
147 def lister(self, header, elements, content_type=None, sort=True):
148 if elements and sort:

Callers 11

bannerMethod · 0.95
currentUserMethod · 0.95
currentDbMethod · 0.95
hostnameMethod · 0.95
dbaMethod · 0.95
dbTablesMethod · 0.95
sqlQueryMethod · 0.95
registerValueMethod · 0.95
_showInjectionsFunction · 0.80
udfInjectCustomMethod · 0.80
runCmdMethod · 0.80

Calls 5

_writeMethod · 0.95
listerMethod · 0.95
isListLikeFunction · 0.90
unArrayizeValueFunction · 0.90
getUnicodeFunction · 0.90

Tested by

no test coverage detected