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

Method _decodeCommand

pager_lib/smb/smb2_structs.py:145–169  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

143 return len(self.raw_data)
144
145 def _decodeCommand(self):
146 if self.command == SMB2_COM_READ:
147 self.payload = SMB2ReadResponse()
148 elif self.command == SMB2_COM_WRITE:
149 self.payload = SMB2WriteResponse()
150 elif self.command == SMB2_COM_QUERY_DIRECTORY:
151 self.payload = SMB2QueryDirectoryResponse()
152 elif self.command == SMB2_COM_CREATE:
153 self.payload = SMB2CreateResponse()
154 elif self.command == SMB2_COM_CLOSE:
155 self.payload = SMB2CloseResponse()
156 elif self.command == SMB2_COM_QUERY_INFO:
157 self.payload = SMB2QueryInfoResponse()
158 elif self.command == SMB2_COM_SET_INFO:
159 self.payload = SMB2SetInfoResponse()
160 elif self.command == SMB2_COM_IOCTL:
161 self.payload = SMB2IoctlResponse()
162 elif self.command == SMB2_COM_TREE_CONNECT:
163 self.payload = SMB2TreeConnectResponse()
164 elif self.command == SMB2_COM_SESSION_SETUP:
165 self.payload = SMB2SessionSetupResponse()
166 elif self.command == SMB2_COM_NEGOTIATE:
167 self.payload = SMB2NegotiateResponse()
168 elif self.command == SMB2_COM_ECHO:
169 self.payload = SMB2EchoResponse()
170
171 @property
172 def isAsync(self):

Callers 1

decodeMethod · 0.95

Calls 12

SMB2ReadResponseClass · 0.85
SMB2WriteResponseClass · 0.85
SMB2CreateResponseClass · 0.85
SMB2CloseResponseClass · 0.85
SMB2SetInfoResponseClass · 0.85
SMB2IoctlResponseClass · 0.85
SMB2EchoResponseClass · 0.85

Tested by

no test coverage detected