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

Method sr1_req

scapy/layers/msrpce/msdcom.py:774–822  ·  view source on GitHub ↗

Make an ORPC call on this object instance. :param iface: the ComInterface to call. :param pkt: the request to make. :param ssp: (optional) non default SSP to use to connect to the object exporter :param auth_level: (optional) non default authn level to use

(
        self,
        pkt: NDRPacket,
        iface: ComInterface,
        ssp=None,
        auth_level=None,
        timeout=None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

772 return self.client.ndr64
773
774 def sr1_req(
775 self,
776 pkt: NDRPacket,
777 iface: ComInterface,
778 ssp=None,
779 auth_level=None,
780 timeout=None,
781 **kwargs,
782 ):
783 """
784 Make an ORPC call on this object instance.
785
786 :param iface: the ComInterface to call.
787 :param pkt: the request to make.
788
789 :param ssp: (optional) non default SSP to use to connect to the object exporter
790 :param auth_level: (optional) non default authn level to use
791 :param timeout: (optional) timeout for the connection
792 """
793 # Look for this object's entry
794 try:
795 oid_entry = self.client.OID_table[self.oid]
796 except KeyError:
797 raise ValueError("This object has been released.")
798
799 # Look for the ipid matching the interface required by the user
800 ipid = None
801 for ipid in oid_entry.ipids:
802 ipid_entry = self.client.IPID_table[ipid]
803 if ipid_entry.iid == iface.uuid:
804 break
805 else:
806 # Acquire interface on the object
807 self.client.AcquireInterface(
808 ipid=oid_entry.ipids[0],
809 iids=[
810 iface,
811 ],
812 cPublicRefs=1,
813 )
814
815 return self.client.sr1_orpc_req(
816 ipid=ipid,
817 pkt=pkt,
818 ssp=ssp,
819 auth_level=auth_level,
820 timeout=timeout,
821 **kwargs,
822 )
823
824 def release(self):
825 """

Callers

nothing calls this directly

Calls 2

AcquireInterfaceMethod · 0.80
sr1_orpc_reqMethod · 0.80

Tested by

no test coverage detected