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

Method sendCreate

pager_lib/smb/base.py:618–639  ·  view source on GitHub ↗
(tid)

Source from the content-addressed store, hash-verified

616 results = [ ]
617
618 def sendCreate(tid):
619 create_context_data = binascii.unhexlify(b"""
62028 00 00 00 10 00 04 00 00 00 18 00 10 00 00 00
62144 48 6e 51 00 00 00 00 00 00 00 00 00 00 00 00
62200 00 00 00 00 00 00 00 18 00 00 00 10 00 04 00
62300 00 18 00 00 00 00 00 4d 78 41 63 00 00 00 00
62400 00 00 00 10 00 04 00 00 00 18 00 00 00 00 00
62551 46 69 64 00 00 00 00
626""".replace(b' ', b'').replace(b'\n', b''))
627 m = SMB2Message(SMB2CreateRequest(path,
628 file_attributes = 0,
629 access_mask = FILE_READ_DATA | FILE_READ_ATTRIBUTES | SYNCHRONIZE,
630 share_access = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
631 oplock = SMB2_OPLOCK_LEVEL_NONE,
632 impersonation = SEC_IMPERSONATE,
633 create_options = FILE_DIRECTORY_FILE,
634 create_disp = FILE_OPEN,
635 create_context_data = create_context_data))
636 m.tid = tid
637 self._sendSMBMessage(m)
638 self.pending_requests[m.mid] = _PendingRequest(m.mid, expiry_time, createCB, errback, tid = tid)
639 self._pushToArray(messages_history, m)
640
641 def createCB(create_message, **kwargs):
642 self._pushToArray(messages_history, create_message)

Callers

nothing calls this directly

Calls 6

_pushToArrayMethod · 0.95
SMB2MessageClass · 0.85
SMB2CreateRequestClass · 0.85
_PendingRequestClass · 0.85
SMBMessageClass · 0.85

Tested by

no test coverage detected