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

Method queryCB

pager_lib/smb/base.py:660–671  ·  view source on GitHub ↗
(query_message, **kwargs)

Source from the content-addressed store, hash-verified

658 self._pushToArray(messages_history, m)
659
660 def queryCB(query_message, **kwargs):
661 self._pushToArray(messages_history, query_message)
662 if query_message.status == 0:
663 data_buf = decodeQueryStruct(kwargs['data_buf'] + query_message.payload.data)
664 sendQuery(kwargs['tid'], kwargs['fid'], data_buf)
665 elif query_message.status == 0xC000000F: # [MS-ERREF]: STATUS_NO_SUCH_FILE
666 # If there are no matching files, we just treat as success instead of failing
667 closeFid(kwargs['tid'], kwargs['fid'], results = results)
668 elif query_message.status == 0x80000006: # STATUS_NO_MORE_FILES
669 closeFid(kwargs['tid'], kwargs['fid'], results = results)
670 else:
671 closeFid(kwargs['tid'], kwargs['fid'], error = query_message.status)
672
673 def decodeQueryStruct(data_bytes):
674 # FileIdBothDirectoryInformation structure. See [MS-SMB]: 2.2.8.1.3 and [MS-FSCC]: 2.4.17

Callers

nothing calls this directly

Calls 7

_pushToArrayMethod · 0.95
SharedFileClass · 0.85
convertFILETIMEtoEpochFunction · 0.85
OperationFailureClass · 0.85
callbackFunction · 0.50
from_bytesMethod · 0.45

Tested by

no test coverage detected