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

Method RemRelease

scapy/layers/msrpce/msdcom.py:1460–1496  ·  view source on GitHub ↗

3.2.4.4.2 Releasing Reference Counts on an Interface

(self, ipid: uuid.UUID)

Source from the content-addressed store, hash-verified

1458 )
1459
1460 def RemRelease(self, ipid: uuid.UUID):
1461 """
1462 3.2.4.4.2 Releasing Reference Counts on an Interface
1463 """
1464
1465 # 1. Look up the OID entry
1466 ipid_entry = self.IPID_table[ipid]
1467 oxid_entry = self.OXID_table[ipid_entry.oxid]
1468 oid_entry = self.OID_table[ipid_entry.oid]
1469
1470 # 2. Perform call
1471 resp = self.sr1_orpc_req(
1472 ipid=oxid_entry.ipid_IRemUnknown,
1473 pkt=RemRelease_Request(
1474 InterfaceRefs=[
1475 REMINTERFACEREF(
1476 ipid=GUID(_uid_to_bytes(ipid)),
1477 cPublicRefs=ipid_entry.cPublicRefs,
1478 cPrivateRefs=ipid_entry.cPrivateRefs,
1479 )
1480 ],
1481 ),
1482 )
1483
1484 # 3. Process answer
1485 if resp and resp.status == 0:
1486 # "When the call returns successfully..."
1487 # "It MUST remove the IPID entry from the IPID table."
1488 del self.IPID_table[ipid]
1489
1490 # "It MUST remove the IPID from the IPID list in the OID entry."
1491 oid_entry.ipids.remove(ipid)
1492
1493 # "If the IPID list of the OID entry is empty, it MUST remove the
1494 # OID entry from the OID table."
1495 if not oid_entry.ipids:
1496 del self.OID_table[ipid_entry.oid]
1497
1498
1499def ServerAlive2(host, timeout=5) -> Tuple[List[STRINGBINDING], List[SECURITYBINDING]]:

Callers 2

_UnmarshallObjrefMethod · 0.95
releaseMethod · 0.80

Calls 6

sr1_orpc_reqMethod · 0.95
RemRelease_RequestClass · 0.90
REMINTERFACEREFClass · 0.90
GUIDClass · 0.90
_uid_to_bytesFunction · 0.85
removeMethod · 0.45

Tested by

no test coverage detected