(create_message, **kwargs)
| 439 | self._pushToArray(messages_history, m) |
| 440 | |
| 441 | def connectSrvSvcCB(create_message, **kwargs): |
| 442 | self._pushToArray(messages_history, create_message) |
| 443 | if create_message.status == 0: |
| 444 | call_id = self._getNextRPCCallID() |
| 445 | # The data_bytes are binding call to Server Service RPC using DCE v1.1 RPC over SMB. See [MS-SRVS] and [C706] |
| 446 | # If you wish to understand the meanings of the byte stream, I would suggest you use a recent version of WireShark to packet capture the stream |
| 447 | data_bytes = \ |
| 448 | binascii.unhexlify(b"""05 00 0b 03 10 00 00 00 74 00 00 00""".replace(b' ', b'')) + \ |
| 449 | struct.pack('<I', call_id) + \ |
| 450 | binascii.unhexlify(b""" |
| 451 | b8 10 b8 10 00 00 00 00 02 00 00 00 00 00 01 00 |
| 452 | c8 4f 32 4b 70 16 d3 01 12 78 5a 47 bf 6e e1 88 |
| 453 | 03 00 00 00 04 5d 88 8a eb 1c c9 11 9f e8 08 00 |
| 454 | 2b 10 48 60 02 00 00 00 01 00 01 00 c8 4f 32 4b |
| 455 | 70 16 d3 01 12 78 5a 47 bf 6e e1 88 03 00 00 00 |
| 456 | 2c 1c b7 6c 12 98 40 45 03 00 00 00 00 00 00 00 |
| 457 | 01 00 00 00 |
| 458 | """.replace(b' ', b'').replace(b'\n', b'')) |
| 459 | m = SMB2Message(SMB2WriteRequest(create_message.payload.fid, data_bytes, 0)) |
| 460 | m.tid = kwargs['tid'] |
| 461 | self._sendSMBMessage(m) |
| 462 | self.pending_requests[m.mid] = _PendingRequest(m.mid, expiry_time, rpcBindCB, errback, tid = kwargs['tid'], fid = create_message.payload.fid) |
| 463 | self._pushToArray(messages_history, m) |
| 464 | else: |
| 465 | errback(OperationFailure('Failed to list shares: Unable to locate Server Service RPC endpoint', messages_history)) |
| 466 | |
| 467 | def rpcBindCB(trans_message, **kwargs): |
| 468 | self._pushToArray(messages_history, trans_message) |
nothing calls this directly
no test coverage detected