Giter Club home page Giter Club logo

kernctl's Introduction

kernctl

Version 0.0.1

kernctl is a library for interacting with OSX kernel extensions via the KEXT Control API

Installing

go get github.com/aschepis/kernctl

Example

package main

import(
    "fmt"
    "github.com/aschepis/kernctl"
)

type KextMessage struct {
    Version uint32
    Command uint32
}

func (msg *KextMessage) Bytes() []byte {
    buf := new(bytes.Buffer)
    binary.Write(buf, binary.LittleEndian, msg)
    return buf.Bytes()
}

func main() {
    msg := &KextMessage{
        Version: 1,
        Command: 17,
    }

  conn := kernctl.NewConnByName("my.kext.name")
    conn.Connect()
    conn.SendCommand(msg)
    conn.Close()
}

Sending Messages

Sending messages via the SendCommand function requires only that your argument implements the kernctl.Message interface

TODO

  • bi-directional communication functionality so that a kext can send information back to a connected client.
  • ability to use the KEXT Notification API to receive notifications from a KEXT
  • some tests? This stuff is unfortunately difficult to test but it may be possible to refactor things enough that there are some testable components that can verify that the interaction with the kext is called properly.

Contributing

By all means, please do! Pull requests and issues are welcome. No offical workflow yet.

Versioning

kernctl uses semantic versioning. This is a bit pointless at the moment since the library is yet to reach 1.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.