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

Method sendReset

pager_lib/smb/base.py:1371–1381  ·  view source on GitHub ↗
(tid, fid)

Source from the content-addressed store, hash-verified

1369 errback(OperationFailure('Failed to reset attributes of %s on %s: Unable to open file' % ( path, service_name ), messages_history))
1370
1371 def sendReset(tid, fid):
1372 m = SMB2Message(SMB2SetInfoRequest(fid,
1373 additional_info = 0,
1374 info_type = SMB2_INFO_FILE,
1375 file_info_class = 4, # FileBasicInformation
1376 data = struct.pack('qqqqii', 0, 0, 0, 0, file_attributes, 0)))
1377 # [MS-SMB2]: 2.2.39, [MS-FSCC]: 2.4, [MS-FSCC]: 2.4.7, [MS-FSCC]: 2.6
1378 m.tid = tid
1379 self._sendSMBMessage(m)
1380 self.pending_requests[m.mid] = _PendingRequest(m.mid, int(time.time()) + timeout, resetCB, errback, tid = tid, fid = fid)
1381 self._pushToArray(messages_history, m)
1382
1383 def resetCB(reset_message, **kwargs):
1384 self._pushToArray(messages_history, reset_message)

Callers

nothing calls this directly

Calls 4

_pushToArrayMethod · 0.95
SMB2MessageClass · 0.85
SMB2SetInfoRequestClass · 0.85
_PendingRequestClass · 0.85

Tested by

no test coverage detected