4.15.2.1. Setting policies for services

Changing the default behavior for services can be accomplished via the self.interface hash attribute. This hash is indexed by the service UUID, and each item in this hash is an action code defining proxy behavior for the given command. The available action codes are shown in the following table:

NameValue
MSRPC_UUID_ACCEPTAllow access to the requested service.
MSRPC_UUID_REJECTReject access to the requested service.
MSRPC_UUID_DROPDrop the request without further notice.

Table 4.44.  Action codes for MSRpc requests.

Example 4.31. Customising RPC to allow connection to service "11223344-5566-7788-99aa-bbccddeeff00"
class MyRpcProxy(MSRpcProxy):
        def config(self):
                self.interface["11223344-5566-7788-99aa-bbccddeeff00"] = MSRPC_UUID_ACCEPT