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

Function dataToTrafficFile

lib/core/common.py:1063–1073  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

1061 kb.prependFlag = isinstance(data, six.string_types) and (len(data) == 1 and data not in ('\n', '\r') or len(data) > 2 and data[0] == '\r' and data[-1] != '\n')
1062
1063def dataToTrafficFile(data):
1064 if not conf.trafficFile:
1065 return
1066
1067 try:
1068 conf.trafficFP.write(data)
1069 conf.trafficFP.flush()
1070 except IOError as ex:
1071 errMsg = "something went wrong while trying "
1072 errMsg += "to write to the traffic file '%s' ('%s')" % (conf.trafficFile, getSafeExString(ex))
1073 raise SqlmapSystemException(errMsg)
1074
1075def dataToDumpFile(dumpFile, data):
1076 try:

Callers 1

logHTTPTrafficFunction · 0.85

Calls 4

getSafeExStringFunction · 0.70
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…