MCPcopy Create free account
hub / github.com/secdev/scapy / AcquireInterface

Method AcquireInterface

scapy/layers/msrpce/msdcom.py:1424–1458  ·  view source on GitHub ↗

[MS-DCOM] 3.2.4.4.3 - Acquiring Additional Interfaces on the Object

(
        self,
        ipid: uuid.UUID,
        iids: List[ComInterface],
        cPublicRefs: int,
    )

Source from the content-addressed store, hash-verified

1422 return resp[ORPCTHAT].payload
1423
1424 def AcquireInterface(
1425 self,
1426 ipid: uuid.UUID,
1427 iids: List[ComInterface],
1428 cPublicRefs: int,
1429 ):
1430 """
1431 [MS-DCOM] 3.2.4.4.3 - Acquiring Additional Interfaces on the Object
1432 """
1433 # 1. Look up the OID entry
1434 ipid_entry = self.IPID_table[ipid]
1435 oxid_entry = self.OXID_table[ipid_entry.oxid]
1436
1437 # 2. Perform call
1438 resp = self.sr1_orpc_req(
1439 ipid=oxid_entry.ipid_IRemUnknown,
1440 pkt=RemQueryInterface_Request(
1441 ripid=GUID(_uid_to_bytes(ipid)),
1442 cRefs=cPublicRefs,
1443 cIids=len(iids),
1444 iids=[GUID(_uid_to_bytes(x.uuid)) for x in iids],
1445 ),
1446 )
1447
1448 # 3. Process answer
1449 if not resp or resp.status != 0:
1450 raise ValueError
1451
1452 # "When the call returns successfully..."
1453 for i, remqir in enumerate(resp.valueof("ppQIResults")):
1454 self._UnmarshallObjref(
1455 OBJREF(iid=iids[i].uuid)
1456 / OBJREF_STANDARD(std=STDOBJREF(bytes(remqir.std))),
1457 iid=iids[i],
1458 )
1459
1460 def RemRelease(self, ipid: uuid.UUID):
1461 """

Callers 2

_UnmarshallObjrefMethod · 0.95
sr1_reqMethod · 0.80

Calls 9

sr1_orpc_reqMethod · 0.95
_UnmarshallObjrefMethod · 0.95
GUIDClass · 0.90
_uid_to_bytesFunction · 0.85
OBJREFClass · 0.85
OBJREF_STANDARDClass · 0.70
STDOBJREFClass · 0.70
valueofMethod · 0.45

Tested by

no test coverage detected