MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _decodePayload

Method _decodePayload

pager_lib/smb/smb_structs.py:234–257  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

232 return self.HEADER_STRUCT_SIZE + params_count * 2 + 2 + body_len
233
234 def _decodePayload(self):
235 if self.command == SMB_COM_READ_ANDX:
236 self.payload = ComReadAndxResponse()
237 elif self.command == SMB_COM_WRITE_ANDX:
238 self.payload = ComWriteAndxResponse()
239 elif self.command == SMB_COM_TRANSACTION:
240 self.payload = ComTransactionResponse()
241 elif self.command == SMB_COM_TRANSACTION2:
242 self.payload = ComTransaction2Response()
243 elif self.command == SMB_COM_OPEN_ANDX:
244 self.payload = ComOpenAndxResponse()
245 elif self.command == SMB_COM_NT_CREATE_ANDX:
246 self.payload = ComNTCreateAndxResponse()
247 elif self.command == SMB_COM_TREE_CONNECT_ANDX:
248 self.payload = ComTreeConnectAndxResponse()
249 elif self.command == SMB_COM_ECHO:
250 self.payload = ComEchoResponse()
251 elif self.command == SMB_COM_SESSION_SETUP_ANDX:
252 self.payload = ComSessionSetupAndxResponse()
253 elif self.command == SMB_COM_NEGOTIATE:
254 self.payload = ComNegotiateResponse()
255
256 if self.payload:
257 self.payload.decode(self)
258
259
260class Payload:

Callers 1

decodeMethod · 0.95

Calls 11

ComReadAndxResponseClass · 0.85
ComOpenAndxResponseClass · 0.85
ComEchoResponseClass · 0.85
decodeMethod · 0.45

Tested by

no test coverage detected