MCPcopy Create free account
hub / github.com/OWASP/Python-Honeypot / byte_to_str

Function byte_to_str

core/compatible.py:210–219  ·  view source on GitHub ↗

convert data to str :param data: data :return: str(data)

(data)

Source from the content-addressed store, hash-verified

208
209
210def byte_to_str(data):
211 """
212 convert data to str
213
214 :param data: data
215 :return: str(data)
216 """
217 return str(
218 data if isinstance(data, str) else data.decode() if data is not None else ""
219 )
220
221
222def is_verbose_mode():

Calls

no outgoing calls

Tested by 1

test_byte_to_strMethod · 0.72