scapy.layers.msrpce.rpcserver
DCE/RPC server as per [MS-RPCE]
- class scapy.layers.msrpce.rpcserver.DCERPC_Server(transport: DCERPC_Transport, ndr64: bool | None = None, verb: bool = True, local_ip: str = None, port: int = None, portmap: Dict[DceRpcInterface, int] = None, **kwargs)[source]
Bases:
object- static answer(reqcls)[source]
A decorator that registers a DCE/RPC responder to a command. See the DCE/RPC documentation.
- Parameters:
reqcls – the DCE/RPC packet class to respond to
- dcerpc_commands = {(UUID('e1af8308-5d1f-11c9-91a4-08002b14a0fa'), 3): <function DCERPC_Server.ept_map>}
- make_reply(req)[source]
Make a response to the DCE/RPC request.
This finds whether a callback has been registered for this particular packet, and call it if available.
- classmethod spawn(transport, iface=None, port=135, bg=False, **kwargs)[source]
Spawn a DCE/RPC server
- Parameters:
transport – one of DCERPC_Transport
iface – the interface to spawn it on (default: conf.iface)
port – the port to spawn it on (for IP_TCP or the SMB server)
bg – background mode? (default: False)
ndr64 – whether NDR64 is supported or not (default: conf.ndr64). This attribute will be overwritten if the client doesn’t support it.