pyplugins.apis.portalcall module

PortalCall Plugin (portalcall.py) for Penguin

This module provides the PortalCall plugin for the Penguin framework, enabling registration and handling of portalcalls via syscall filtering. It allows plugins to register handlers for specific portalcall magic values and process arguments from guest syscalls.

Features

  • Register portalcall handlers for specific magic values.

  • Handle portalcall syscalls and dispatch to registered handlers.

  • Safely read arguments from guest memory and return results.

  • Supports coroutine-style handler functions.

Example Usage

from penguin import plugins

@plugins.portalcall.portalcall(0x12345678)
def my_portalcall_handler(arg1, arg2):
    # Process arguments and return result
    return arg1 + arg2

Classes

  • PortalCall: Main plugin class for portalcall registration and handling.

class pyplugins.apis.portalcall.PortalCall[source]

Bases: Plugin

Plugin that provides an interface to register and handle portalcalls via syscall filtering.

portalcall(user_magic)[source]

Decorator to register a portalcall handler for a given user_magic value.

Parameters:

user_magic (int)