MCPcopy Create free account
hub / github.com/ELMERIKH/PyinMemoryPE / forge_alpc_request

Method forge_alpc_request

windows/rpc/client.py:89–100  ·  view source on GitHub ↗

Craft an ALPC message containing an RPC request to call ``method_offset`` of interface ``IID` with ``params``. Can be used to craft request without directly sending it

(self, IID, method_offset, params, ipid=None)

Source from the content-addressed store, hash-verified

87 return IID
88
89 def forge_alpc_request(self, IID, method_offset, params, ipid=None):
90 """Craft an ALPC message containing an RPC request to call ``method_offset`` of interface ``IID`
91 with ``params``.
92 Can be used to craft request without directly sending it
93 """
94 iid_hash = hash(buffer(IID)[:])
95 interface_nb = self.if_bind_number[iid_hash] # TODO: add __hash__ to IID
96 if len(params) > 0x900: # 0x1000 - size of meta-data
97 request = self._forge_call_request_in_view(interface_nb, method_offset, params, ipid=ipid)
98 else:
99 request = self._forge_call_request(interface_nb, method_offset, params, ipid=ipid)
100 return request
101
102 def call(self, IID, method_offset, params, ipid=None):
103 """Call method number ``method_offset`` of interface ``IID`` with mashalled ``params``

Callers 1

callMethod · 0.95

Calls 3

_forge_call_requestMethod · 0.95
bufferFunction · 0.85

Tested by

no test coverage detected