MCPcopy Create free account
hub / github.com/fortra/impacket / _encode_binary

Method _encode_binary

examples/exchanger.py:121–129  ·  view source on GitHub ↗
(self, bytestr)

Source from the content-addressed store, hash-verified

119 print(text)
120
121 def _encode_binary(self, bytestr):
122 if PY3 and self._output_type == "hex":
123 return "0x%s" % str(binascii.hexlify(bytestr), 'ascii')
124 elif self._output_type == "hex":
125 return "0x%s" % binascii.hexlify(bytestr)
126 elif PY3:
127 return str(base64.b64encode(bytestr), 'ascii')
128 else:
129 return base64.b64encode(bytestr)
130
131 def __del__(self):
132 if self.__outputFd != None:

Callers 1

print_rowMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected