Crate capcom0[][src]

Rust bindings to the infamous Capcom driver.

The Capcom driver enables ordinary Administrator applications to gain kernel level ring0 execution privileges.

Examples

fn main() {
    // Easy setup to load the driver and open its device handle.
    let result = capcom0::setup(|device| {
        let mut success = false;
        // This unsafe is an understatement :)
        unsafe {
            // The closure is executed with kernel privileges
            device.elevate(|ctx| {
                success = true;
            });
        }
        success
    });
    assert_eq!(result, Ok(true));
}

Structs

Context

Kernel callback context.

Device

Capcom device.

Driver

Capcom driver manager.

Enums

Error

Errors for setup.

Functions

enable_privileges

Enables the privileges to load and unload drivers.

recover

Recover from failures.

setup

Easy setup.

Type Definitions

MmGetSystemRoutineAddressFn

The callback is passed the address of MmGetSystemRoutineAddress.