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

Method write

lib/core/common.py:215–238  ·  view source on GitHub ↗

Write an .ini-format representation of the configuration state.

(self, fp)

Source from the content-addressed store, hash-verified

213 """
214
215 def write(self, fp):
216 """
217 Write an .ini-format representation of the configuration state.
218 """
219
220 if self._defaults:
221 fp.write("[%s]\n" % _configparser.DEFAULTSECT)
222
223 for (key, value) in self._defaults.items():
224 fp.write("%s = %s" % (key, getUnicode(value, UNICODE_ENCODING)))
225
226 fp.write("\n")
227
228 for section in self._sections:
229 fp.write("[%s]\n" % section)
230
231 for (key, value) in self._sections[section].items():
232 if key != "__name__":
233 if value is None:
234 fp.write("%s\n" % (key))
235 elif not isListLike(value):
236 fp.write("%s = %s\n" % (key, getUnicode(value, UNICODE_ENCODING)))
237
238 fp.write("\n")
239
240class Format(object):
241 @staticmethod

Callers 9

saveConfigFunction · 0.95
dataToStdoutFunction · 0.45
dataToTrafficFileFunction · 0.45
dataToDumpFileFunction · 0.45
dataToOutFileFunction · 0.45
createGithubIssueFunction · 0.45
hashDBWriteFunction · 0.45
resetCookieJarFunction · 0.45
decloakToTempFunction · 0.45

Calls 3

getUnicodeFunction · 0.90
itemsMethod · 0.80
isListLikeFunction · 0.70

Tested by

no test coverage detected