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

Method send_data

examples/smbexec.py:306–315  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

304 self.get_output()
305
306 def send_data(self, data):
307 self.execute_remote(data, self.__shell_type)
308 try:
309 print(self.__outputBuffer.decode(CODEC))
310 except UnicodeDecodeError:
311 logging.error('Decoding error detected, consider running chcp.com at the target,\nmap the result with '
312 'https://docs.python.org/3/library/codecs.html#standard-encodings\nand then execute smbexec.py '
313 'again with -codec and the corresponding codec')
314 print(self.__outputBuffer.decode(CODEC, errors='replace'))
315 self.__outputBuffer = b''
316
317
318# Process command-line arguments.

Callers 1

defaultMethod · 0.95

Calls 2

execute_remoteMethod · 0.95
decodeMethod · 0.45

Tested by

no test coverage detected