Skip to content

Instantly share code, notes, and snippets.

@oleavr
Created February 18, 2015 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oleavr/4c5f6563276a0fd931ed to your computer and use it in GitHub Desktop.
Save oleavr/4c5f6563276a0fd931ed to your computer and use it in GitHub Desktop.
The frida-core VAPI consumed by bindings
[CCode (cheader_filename = "frida-core.h", cprefix = "Frida", lower_case_cprefix = "frida_")]
namespace Frida {
public static void init ();
public static void shutdown ();
public static void deinit ();
public static unowned GLib.MainContext get_main_context ();
public enum DeviceType {
LOCAL,
TETHER,
REMOTE
}
public class DeviceManager : GLib.Object {
public DeviceManager ();
public async void close ();
public void close_sync ();
public async Frida.DeviceList enumerate_devices () throws GLib.Error;
public Frida.DeviceList enumerate_devices_sync () throws GLib.Error;
public signal void added (Frida.Device device);
public signal void changed ();
public signal void removed (Frida.Device device);
}
public class DeviceList : GLib.Object {
public int size ();
public new Frida.Device @get (int index);
}
public class Device : GLib.Object {
public uint id { get; private set; }
public string name { get; private set; }
public Frida.Icon? icon { get; private set; }
public Frida.DeviceType dtype { get; private set; }
public async Frida.ProcessList enumerate_processes () throws GLib.Error;
public Frida.ProcessList enumerate_processes_sync () throws GLib.Error;
public async uint spawn (string path, string[] argv, string[] envp) throws GLib.Error;
public uint spawn_sync (string path, string[] argv, string[] envp) throws GLib.Error;
public async void resume (uint pid) throws GLib.Error;
public void resume_sync (uint pid) throws GLib.Error;
public async Frida.Session attach (uint pid) throws GLib.Error;
public Frida.Session attach_sync (uint pid) throws GLib.Error;
public signal void lost ();
}
public class ProcessList : GLib.Object {
public int size ();
public new Frida.Process @get (int index);
}
public class Process : GLib.Object {
public uint pid { get; private set; }
public string name { get; private set; }
public Frida.Icon? small_icon { get; private set; }
public Frida.Icon? large_icon { get; private set; }
}
public class Icon : GLib.Object {
public int width { get; private set; }
public int height { get; private set; }
public int rowstride { get; private set; }
public uint8[] pixels { get; private set; }
}
public class Session : GLib.Object {
public uint pid { get; private set; }
public async void detach ();
public void detach_sync ();
public async Frida.Script create_script (string source) throws GLib.Error;
public Frida.Script create_script_sync (string source) throws GLib.Error;
public signal void detached ();
}
public class Script : GLib.Object {
public async void load () throws GLib.Error;
public void load_sync () throws GLib.Error;
public async void unload () throws GLib.Error;
public void unload_sync () throws GLib.Error;
public async void post_message (string message) throws GLib.Error;
public void post_message_sync (string message) throws GLib.Error;
public signal void message (string message, uint8[] data);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment