frida 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +84 -84
- data/Gemfile +12 -12
- data/Gemfile.lock +25 -25
- data/LICENSE.txt +21 -21
- data/README.md +64 -64
- data/Rakefile +20 -20
- data/exe/frida +3 -3
- data/ext/c_frida/Application.c +79 -79
- data/ext/c_frida/Bus.c +91 -91
- data/ext/c_frida/Child.c +134 -134
- data/ext/c_frida/Compiler.c +0 -0
- data/ext/c_frida/Crash.c +0 -0
- data/ext/c_frida/Device.c +955 -955
- data/ext/c_frida/DeviceManager.c +260 -260
- data/ext/c_frida/EndpointParameters.c +0 -0
- data/ext/c_frida/FileMonitor.c +0 -0
- data/ext/c_frida/GObject.c +0 -0
- data/ext/c_frida/IOStream.c +228 -228
- data/ext/c_frida/PortalMembership.c +0 -0
- data/ext/c_frida/PortalService.c +0 -0
- data/ext/c_frida/Process.c +67 -67
- data/ext/c_frida/Relay.c +0 -0
- data/ext/c_frida/Script.c +221 -221
- data/ext/c_frida/Session.c +626 -626
- data/ext/c_frida/Spawn.c +53 -53
- data/ext/c_frida/c_frida.c +68 -68
- data/ext/c_frida/extconf.rb +25 -25
- data/ext/c_frida/gutils.c +498 -498
- data/ext/c_frida/gvl_bridge.c +131 -131
- data/ext/c_frida/inc/Application.h +9 -9
- data/ext/c_frida/inc/Bus.h +15 -15
- data/ext/c_frida/inc/Child.h +9 -9
- data/ext/c_frida/inc/Compiler.h +0 -0
- data/ext/c_frida/inc/Crash.h +0 -0
- data/ext/c_frida/inc/Device.h +71 -71
- data/ext/c_frida/inc/DeviceManager.h +20 -20
- data/ext/c_frida/inc/EndpointParameters.h +0 -0
- data/ext/c_frida/inc/FileMonitor.h +0 -0
- data/ext/c_frida/inc/GObject.h +0 -0
- data/ext/c_frida/inc/IOStream.h +29 -29
- data/ext/c_frida/inc/PortalMembership.h +0 -0
- data/ext/c_frida/inc/PortalService.h +0 -0
- data/ext/c_frida/inc/Process.h +9 -9
- data/ext/c_frida/inc/Relay.h +0 -0
- data/ext/c_frida/inc/Script.h +21 -21
- data/ext/c_frida/inc/Session.h +40 -40
- data/ext/c_frida/inc/Spawn.h +9 -9
- data/ext/c_frida/inc/c_frida.h +129 -129
- data/ext/c_frida/inc/gutils.h +21 -21
- data/ext/c_frida/inc/gvl_bridge.h +42 -42
- data/lib/frida/version.rb +5 -5
- data/lib/frida.rb +8 -8
- metadata +3 -6
- data/frida.gemspec +0 -39
data/ext/c_frida/gvl_bridge.c
CHANGED
@@ -1,131 +1,131 @@
|
|
1
|
-
#include "gvl_bridge.h"
|
2
|
-
|
3
|
-
static int _gvl_bridge_pipe[2] = {-1, -1};
|
4
|
-
static int __gvl_bridge_pipe[2] = {-1, -1};
|
5
|
-
static bool main_thread_exited = false;
|
6
|
-
|
7
|
-
static void gvl_bridge_signal_exit(VALUE _)
|
8
|
-
{
|
9
|
-
main_thread_exited = true;
|
10
|
-
close(_gvl_bridge_pipe[0]);
|
11
|
-
close(_gvl_bridge_pipe[1]);
|
12
|
-
close(__gvl_bridge_pipe[0]);
|
13
|
-
close(__gvl_bridge_pipe[1]);
|
14
|
-
}
|
15
|
-
|
16
|
-
void gvl_bridge_forward_GC(GClosure *closure, GValue *_, guint n_param_values, GValue *param_values, gpointer __, gpointer ___)
|
17
|
-
{
|
18
|
-
void *dummy;
|
19
|
-
gvl_bridge_data *data = malloc(sizeof(gvl_bridge_data));
|
20
|
-
|
21
|
-
data->type = GCLOSURE;
|
22
|
-
data->GC.closure = closure;
|
23
|
-
data->GC.n_param_values = n_param_values;
|
24
|
-
data->GC.param_values = param_values;
|
25
|
-
write(_gvl_bridge_pipe[1], &data, sizeof(void *));
|
26
|
-
// hold until the callback is done, also prevents GC-ing param_values
|
27
|
-
read(__gvl_bridge_pipe[0], &dummy, sizeof(void *));
|
28
|
-
if (data->GC.param_values != param_values)
|
29
|
-
free(data->GC.param_values);
|
30
|
-
free(data);
|
31
|
-
}
|
32
|
-
|
33
|
-
static VALUE GC_rbcall(gclosure_callback *callback)
|
34
|
-
{
|
35
|
-
RBClosure *rc = TO_RBCLOSURE(callback->closure);
|
36
|
-
VALUE *args_array;
|
37
|
-
|
38
|
-
int arity = rc->is_lambda ? MIN(callback->n_param_values, rc->arity) : (callback->n_param_values - 1);
|
39
|
-
if (arity == -1) // splat operator
|
40
|
-
arity = callback->n_param_values;
|
41
|
-
if (callback->n_param_values == arity)
|
42
|
-
args_array = rbGObjectSignalClosure_marshal_params(callback->param_values, arity);
|
43
|
-
else
|
44
|
-
args_array = rbGObjectSignalClosure_marshal_params(callback->param_values + 1, arity); // +1 skip sender instance.
|
45
|
-
callback->param_values = (void *)args_array;
|
46
|
-
rb_funcallv((VALUE)callback->closure->data, rb_intern("call"), arity, args_array);
|
47
|
-
return (Qnil);
|
48
|
-
}
|
49
|
-
|
50
|
-
static void gvl_bridge_call_GC(gclosure_callback *data)
|
51
|
-
{
|
52
|
-
int state;
|
53
|
-
|
54
|
-
rb_protect((VALUE (*)(VALUE))GC_rbcall, (VALUE)data, &state);
|
55
|
-
if (state)
|
56
|
-
rb_set_errinfo(Qnil);
|
57
|
-
}
|
58
|
-
|
59
|
-
void gvl_bridge_forward_GT(GTask *task, FridaRBAuthenticationService *self)
|
60
|
-
{
|
61
|
-
gvl_bridge_data *data = malloc(sizeof(gvl_bridge_data));
|
62
|
-
|
63
|
-
data->type = GTASK;
|
64
|
-
data->GT.task = task;
|
65
|
-
data->GT.self = self;
|
66
|
-
write(_gvl_bridge_pipe[1], &data, sizeof(void *));
|
67
|
-
}
|
68
|
-
|
69
|
-
static VALUE GT_rbcall(gtask_callback *data)
|
70
|
-
{
|
71
|
-
gchar *token;
|
72
|
-
|
73
|
-
token = g_task_get_task_data(data->task);
|
74
|
-
return (rb_funcall((VALUE)data->self->callback, rb_intern("call"), 1, rb_str_new_cstr(token)));
|
75
|
-
}
|
76
|
-
|
77
|
-
static void gvl_bridge_call_GT(gtask_callback *data)
|
78
|
-
{
|
79
|
-
int state;
|
80
|
-
gchar *msg = NULL;
|
81
|
-
VALUE result;
|
82
|
-
|
83
|
-
result = rb_protect((VALUE (*)(VALUE))GT_rbcall, (VALUE)data, &state);
|
84
|
-
if (state) {
|
85
|
-
result = rb_funcall(rb_gv_get("$!"), rb_intern("message"), 0);
|
86
|
-
if (result != Qnil)
|
87
|
-
msg = g_strdup(StringValueCStr(result));
|
88
|
-
else
|
89
|
-
msg = g_strdup("Internal error");
|
90
|
-
rb_set_errinfo(Qnil);
|
91
|
-
g_task_return_new_error(data->task, FRIDA_ERROR, FRIDA_ERROR_INVALID_ARGUMENT, "%s", msg);
|
92
|
-
g_free(msg);
|
93
|
-
} else {
|
94
|
-
rbGObject_unmarshal_string(result, &msg);
|
95
|
-
g_task_return_pointer(data->task, msg, g_free);
|
96
|
-
}
|
97
|
-
g_object_unref(data->task);
|
98
|
-
}
|
99
|
-
|
100
|
-
static void gvl_bridge_main()
|
101
|
-
{
|
102
|
-
gvl_bridge_data *data;
|
103
|
-
|
104
|
-
g_assert(sizeof(void *) <= sizeof(VALUE));
|
105
|
-
while (1) {
|
106
|
-
read(_gvl_bridge_pipe[0], &data, sizeof(void *));
|
107
|
-
if (!data || main_thread_exited)
|
108
|
-
return;
|
109
|
-
if (data->type == GCLOSURE) {
|
110
|
-
rb_thread_call_with_gvl((void_fp)gvl_bridge_call_GC, &data->GC);
|
111
|
-
write(__gvl_bridge_pipe[1], &data, sizeof(void *));
|
112
|
-
} else if (data->type == GTASK) {
|
113
|
-
rb_thread_call_with_gvl((void_fp)gvl_bridge_call_GT, &data->GT);
|
114
|
-
free(data);
|
115
|
-
}
|
116
|
-
}
|
117
|
-
}
|
118
|
-
|
119
|
-
void gvl_bridge(void)
|
120
|
-
{
|
121
|
-
if (pipe(_gvl_bridge_pipe) < 0) {
|
122
|
-
raise_rerror("pipe() error @ gvl_bridge", NULL);
|
123
|
-
exit(EXIT_FAILURE);
|
124
|
-
}
|
125
|
-
if (pipe(__gvl_bridge_pipe) < 0) {
|
126
|
-
raise_rerror("pipe() error @ gvl_bridge", NULL);
|
127
|
-
exit(EXIT_FAILURE);
|
128
|
-
}
|
129
|
-
rb_set_end_proc(gvl_bridge_signal_exit, Qnil);
|
130
|
-
rb_thread_call_without_gvl((void_fp)gvl_bridge_main, NULL, RUBY_UBF_IO, NULL);
|
131
|
-
}
|
1
|
+
#include "gvl_bridge.h"
|
2
|
+
|
3
|
+
static int _gvl_bridge_pipe[2] = {-1, -1};
|
4
|
+
static int __gvl_bridge_pipe[2] = {-1, -1};
|
5
|
+
static bool main_thread_exited = false;
|
6
|
+
|
7
|
+
static void gvl_bridge_signal_exit(VALUE _)
|
8
|
+
{
|
9
|
+
main_thread_exited = true;
|
10
|
+
close(_gvl_bridge_pipe[0]);
|
11
|
+
close(_gvl_bridge_pipe[1]);
|
12
|
+
close(__gvl_bridge_pipe[0]);
|
13
|
+
close(__gvl_bridge_pipe[1]);
|
14
|
+
}
|
15
|
+
|
16
|
+
void gvl_bridge_forward_GC(GClosure *closure, GValue *_, guint n_param_values, GValue *param_values, gpointer __, gpointer ___)
|
17
|
+
{
|
18
|
+
void *dummy;
|
19
|
+
gvl_bridge_data *data = malloc(sizeof(gvl_bridge_data));
|
20
|
+
|
21
|
+
data->type = GCLOSURE;
|
22
|
+
data->GC.closure = closure;
|
23
|
+
data->GC.n_param_values = n_param_values;
|
24
|
+
data->GC.param_values = param_values;
|
25
|
+
write(_gvl_bridge_pipe[1], &data, sizeof(void *));
|
26
|
+
// hold until the callback is done, also prevents GC-ing param_values
|
27
|
+
read(__gvl_bridge_pipe[0], &dummy, sizeof(void *));
|
28
|
+
if (data->GC.param_values != param_values)
|
29
|
+
free(data->GC.param_values);
|
30
|
+
free(data);
|
31
|
+
}
|
32
|
+
|
33
|
+
static VALUE GC_rbcall(gclosure_callback *callback)
|
34
|
+
{
|
35
|
+
RBClosure *rc = TO_RBCLOSURE(callback->closure);
|
36
|
+
VALUE *args_array;
|
37
|
+
|
38
|
+
int arity = rc->is_lambda ? MIN(callback->n_param_values, rc->arity) : (callback->n_param_values - 1);
|
39
|
+
if (arity == -1) // splat operator
|
40
|
+
arity = callback->n_param_values;
|
41
|
+
if (callback->n_param_values == arity)
|
42
|
+
args_array = rbGObjectSignalClosure_marshal_params(callback->param_values, arity);
|
43
|
+
else
|
44
|
+
args_array = rbGObjectSignalClosure_marshal_params(callback->param_values + 1, arity); // +1 skip sender instance.
|
45
|
+
callback->param_values = (void *)args_array;
|
46
|
+
rb_funcallv((VALUE)callback->closure->data, rb_intern("call"), arity, args_array);
|
47
|
+
return (Qnil);
|
48
|
+
}
|
49
|
+
|
50
|
+
static void gvl_bridge_call_GC(gclosure_callback *data)
|
51
|
+
{
|
52
|
+
int state;
|
53
|
+
|
54
|
+
rb_protect((VALUE (*)(VALUE))GC_rbcall, (VALUE)data, &state);
|
55
|
+
if (state)
|
56
|
+
rb_set_errinfo(Qnil);
|
57
|
+
}
|
58
|
+
|
59
|
+
void gvl_bridge_forward_GT(GTask *task, FridaRBAuthenticationService *self)
|
60
|
+
{
|
61
|
+
gvl_bridge_data *data = malloc(sizeof(gvl_bridge_data));
|
62
|
+
|
63
|
+
data->type = GTASK;
|
64
|
+
data->GT.task = task;
|
65
|
+
data->GT.self = self;
|
66
|
+
write(_gvl_bridge_pipe[1], &data, sizeof(void *));
|
67
|
+
}
|
68
|
+
|
69
|
+
static VALUE GT_rbcall(gtask_callback *data)
|
70
|
+
{
|
71
|
+
gchar *token;
|
72
|
+
|
73
|
+
token = g_task_get_task_data(data->task);
|
74
|
+
return (rb_funcall((VALUE)data->self->callback, rb_intern("call"), 1, rb_str_new_cstr(token)));
|
75
|
+
}
|
76
|
+
|
77
|
+
static void gvl_bridge_call_GT(gtask_callback *data)
|
78
|
+
{
|
79
|
+
int state;
|
80
|
+
gchar *msg = NULL;
|
81
|
+
VALUE result;
|
82
|
+
|
83
|
+
result = rb_protect((VALUE (*)(VALUE))GT_rbcall, (VALUE)data, &state);
|
84
|
+
if (state) {
|
85
|
+
result = rb_funcall(rb_gv_get("$!"), rb_intern("message"), 0);
|
86
|
+
if (result != Qnil)
|
87
|
+
msg = g_strdup(StringValueCStr(result));
|
88
|
+
else
|
89
|
+
msg = g_strdup("Internal error");
|
90
|
+
rb_set_errinfo(Qnil);
|
91
|
+
g_task_return_new_error(data->task, FRIDA_ERROR, FRIDA_ERROR_INVALID_ARGUMENT, "%s", msg);
|
92
|
+
g_free(msg);
|
93
|
+
} else {
|
94
|
+
rbGObject_unmarshal_string(result, &msg);
|
95
|
+
g_task_return_pointer(data->task, msg, g_free);
|
96
|
+
}
|
97
|
+
g_object_unref(data->task);
|
98
|
+
}
|
99
|
+
|
100
|
+
static void gvl_bridge_main()
|
101
|
+
{
|
102
|
+
gvl_bridge_data *data;
|
103
|
+
|
104
|
+
g_assert(sizeof(void *) <= sizeof(VALUE));
|
105
|
+
while (1) {
|
106
|
+
read(_gvl_bridge_pipe[0], &data, sizeof(void *));
|
107
|
+
if (!data || main_thread_exited)
|
108
|
+
return;
|
109
|
+
if (data->type == GCLOSURE) {
|
110
|
+
rb_thread_call_with_gvl((void_fp)gvl_bridge_call_GC, &data->GC);
|
111
|
+
write(__gvl_bridge_pipe[1], &data, sizeof(void *));
|
112
|
+
} else if (data->type == GTASK) {
|
113
|
+
rb_thread_call_with_gvl((void_fp)gvl_bridge_call_GT, &data->GT);
|
114
|
+
free(data);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
|
119
|
+
void gvl_bridge(void)
|
120
|
+
{
|
121
|
+
if (pipe(_gvl_bridge_pipe) < 0) {
|
122
|
+
raise_rerror("pipe() error @ gvl_bridge", NULL);
|
123
|
+
exit(EXIT_FAILURE);
|
124
|
+
}
|
125
|
+
if (pipe(__gvl_bridge_pipe) < 0) {
|
126
|
+
raise_rerror("pipe() error @ gvl_bridge", NULL);
|
127
|
+
exit(EXIT_FAILURE);
|
128
|
+
}
|
129
|
+
rb_set_end_proc(gvl_bridge_signal_exit, Qnil);
|
130
|
+
rb_thread_call_without_gvl((void_fp)gvl_bridge_main, NULL, RUBY_UBF_IO, NULL);
|
131
|
+
}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "c_frida.h"
|
4
|
-
|
5
|
-
extern VALUE mCFrida;
|
6
|
-
extern VALUE cApplication;
|
7
|
-
|
8
|
-
void define_Application();
|
9
|
-
VALUE Application_from_FridaApplication(FridaApplication *handle);
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include "c_frida.h"
|
4
|
+
|
5
|
+
extern VALUE mCFrida;
|
6
|
+
extern VALUE cApplication;
|
7
|
+
|
8
|
+
void define_Application();
|
9
|
+
VALUE Application_from_FridaApplication(FridaApplication *handle);
|
data/ext/c_frida/inc/Bus.h
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "c_frida.h"
|
4
|
-
|
5
|
-
extern VALUE mCFrida;
|
6
|
-
extern VALUE cBus;
|
7
|
-
|
8
|
-
typedef struct {
|
9
|
-
FridaBus *handle;
|
10
|
-
char *message;
|
11
|
-
GBytes *data;
|
12
|
-
} bus_post_proxy_args;
|
13
|
-
|
14
|
-
void define_Bus();
|
15
|
-
VALUE Bus_from_FridaBus(FridaBus *fridabus);
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include "c_frida.h"
|
4
|
+
|
5
|
+
extern VALUE mCFrida;
|
6
|
+
extern VALUE cBus;
|
7
|
+
|
8
|
+
typedef struct {
|
9
|
+
FridaBus *handle;
|
10
|
+
char *message;
|
11
|
+
GBytes *data;
|
12
|
+
} bus_post_proxy_args;
|
13
|
+
|
14
|
+
void define_Bus();
|
15
|
+
VALUE Bus_from_FridaBus(FridaBus *fridabus);
|
data/ext/c_frida/inc/Child.h
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "c_frida.h"
|
4
|
-
|
5
|
-
extern VALUE mCFrida;
|
6
|
-
extern VALUE cChild;
|
7
|
-
|
8
|
-
void define_Child();
|
9
|
-
VALUE Child_from_FridaChild(FridaChild *stream);
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include "c_frida.h"
|
4
|
+
|
5
|
+
extern VALUE mCFrida;
|
6
|
+
extern VALUE cChild;
|
7
|
+
|
8
|
+
void define_Child();
|
9
|
+
VALUE Child_from_FridaChild(FridaChild *stream);
|
data/ext/c_frida/inc/Compiler.h
CHANGED
File without changes
|
data/ext/c_frida/inc/Crash.h
CHANGED
File without changes
|
data/ext/c_frida/inc/Device.h
CHANGED
@@ -1,71 +1,71 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "c_frida.h"
|
4
|
-
|
5
|
-
extern VALUE mCFrida;
|
6
|
-
extern VALUE cDevice;
|
7
|
-
|
8
|
-
typedef struct {
|
9
|
-
FridaDevice *device_handle;
|
10
|
-
char *address;
|
11
|
-
} open_channel_proxy_args;
|
12
|
-
|
13
|
-
typedef struct {
|
14
|
-
FridaDevice *device_handle;
|
15
|
-
FridaFrontmostQueryOptions *options;
|
16
|
-
} get_frontmost_application_proxy_args;
|
17
|
-
|
18
|
-
typedef struct {
|
19
|
-
FridaDevice *device_handle;
|
20
|
-
FridaProcessQueryOptions *options;
|
21
|
-
} enumerate_processes_proxy_args;
|
22
|
-
|
23
|
-
typedef struct {
|
24
|
-
FridaDevice *device_handle;
|
25
|
-
FridaApplicationQueryOptions *options;
|
26
|
-
} enumerate_applications_proxy_args;
|
27
|
-
|
28
|
-
typedef struct {
|
29
|
-
FridaDevice *device_handle;
|
30
|
-
char *program;
|
31
|
-
FridaSpawnOptions *options;
|
32
|
-
} spawn_sync_proxy_args;
|
33
|
-
|
34
|
-
typedef struct {
|
35
|
-
FridaDevice *device_handle;
|
36
|
-
guint pid;
|
37
|
-
} resume_sync_proxy_args;
|
38
|
-
|
39
|
-
typedef resume_sync_proxy_args kill_sync_proxy_args;
|
40
|
-
|
41
|
-
typedef struct {
|
42
|
-
FridaDevice *device_handle;
|
43
|
-
guint pid;
|
44
|
-
GBytes *data;
|
45
|
-
} input_sync_proxy_args;
|
46
|
-
|
47
|
-
typedef struct {
|
48
|
-
FridaDevice *device_handle;
|
49
|
-
guint pid;
|
50
|
-
char *path;
|
51
|
-
char *entrypoint;
|
52
|
-
char *data;
|
53
|
-
} inject_library_file_sync_proxy_args;
|
54
|
-
|
55
|
-
typedef struct {
|
56
|
-
FridaDevice *device_handle;
|
57
|
-
guint pid;
|
58
|
-
GBytes *blob;
|
59
|
-
char *entrypoint;
|
60
|
-
char *data;
|
61
|
-
} inject_library_blob_sync_proxy_args;
|
62
|
-
|
63
|
-
typedef struct {
|
64
|
-
FridaDevice *device_handle;
|
65
|
-
guint pid;
|
66
|
-
FridaSessionOptions *options;
|
67
|
-
} attach_sync_proxy_args;
|
68
|
-
|
69
|
-
void define_Device();
|
70
|
-
VALUE Device_from_FridaDevice(FridaDevice *device);
|
71
|
-
int array_all_type(VALUE arr, VALUE rtype);
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include "c_frida.h"
|
4
|
+
|
5
|
+
extern VALUE mCFrida;
|
6
|
+
extern VALUE cDevice;
|
7
|
+
|
8
|
+
typedef struct {
|
9
|
+
FridaDevice *device_handle;
|
10
|
+
char *address;
|
11
|
+
} open_channel_proxy_args;
|
12
|
+
|
13
|
+
typedef struct {
|
14
|
+
FridaDevice *device_handle;
|
15
|
+
FridaFrontmostQueryOptions *options;
|
16
|
+
} get_frontmost_application_proxy_args;
|
17
|
+
|
18
|
+
typedef struct {
|
19
|
+
FridaDevice *device_handle;
|
20
|
+
FridaProcessQueryOptions *options;
|
21
|
+
} enumerate_processes_proxy_args;
|
22
|
+
|
23
|
+
typedef struct {
|
24
|
+
FridaDevice *device_handle;
|
25
|
+
FridaApplicationQueryOptions *options;
|
26
|
+
} enumerate_applications_proxy_args;
|
27
|
+
|
28
|
+
typedef struct {
|
29
|
+
FridaDevice *device_handle;
|
30
|
+
char *program;
|
31
|
+
FridaSpawnOptions *options;
|
32
|
+
} spawn_sync_proxy_args;
|
33
|
+
|
34
|
+
typedef struct {
|
35
|
+
FridaDevice *device_handle;
|
36
|
+
guint pid;
|
37
|
+
} resume_sync_proxy_args;
|
38
|
+
|
39
|
+
typedef resume_sync_proxy_args kill_sync_proxy_args;
|
40
|
+
|
41
|
+
typedef struct {
|
42
|
+
FridaDevice *device_handle;
|
43
|
+
guint pid;
|
44
|
+
GBytes *data;
|
45
|
+
} input_sync_proxy_args;
|
46
|
+
|
47
|
+
typedef struct {
|
48
|
+
FridaDevice *device_handle;
|
49
|
+
guint pid;
|
50
|
+
char *path;
|
51
|
+
char *entrypoint;
|
52
|
+
char *data;
|
53
|
+
} inject_library_file_sync_proxy_args;
|
54
|
+
|
55
|
+
typedef struct {
|
56
|
+
FridaDevice *device_handle;
|
57
|
+
guint pid;
|
58
|
+
GBytes *blob;
|
59
|
+
char *entrypoint;
|
60
|
+
char *data;
|
61
|
+
} inject_library_blob_sync_proxy_args;
|
62
|
+
|
63
|
+
typedef struct {
|
64
|
+
FridaDevice *device_handle;
|
65
|
+
guint pid;
|
66
|
+
FridaSessionOptions *options;
|
67
|
+
} attach_sync_proxy_args;
|
68
|
+
|
69
|
+
void define_Device();
|
70
|
+
VALUE Device_from_FridaDevice(FridaDevice *device);
|
71
|
+
int array_all_type(VALUE arr, VALUE rtype);
|
@@ -1,20 +1,20 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "c_frida.h"
|
4
|
-
|
5
|
-
extern VALUE mCFrida;
|
6
|
-
extern VALUE cDeviceManager;
|
7
|
-
|
8
|
-
typedef struct {
|
9
|
-
FridaDeviceManager *device_manager;
|
10
|
-
char *address;
|
11
|
-
FridaRemoteDeviceOptions *options;
|
12
|
-
} add_remote_device_proxy_args;
|
13
|
-
|
14
|
-
typedef struct {
|
15
|
-
FridaDeviceManager *device_manager;
|
16
|
-
char *address;
|
17
|
-
} remove_remote_devices_proxy_args;
|
18
|
-
|
19
|
-
void define_DeviceManager();
|
20
|
-
VALUE DeviceManager_from_FridaDeviceManager(FridaDeviceManager *handle);
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include "c_frida.h"
|
4
|
+
|
5
|
+
extern VALUE mCFrida;
|
6
|
+
extern VALUE cDeviceManager;
|
7
|
+
|
8
|
+
typedef struct {
|
9
|
+
FridaDeviceManager *device_manager;
|
10
|
+
char *address;
|
11
|
+
FridaRemoteDeviceOptions *options;
|
12
|
+
} add_remote_device_proxy_args;
|
13
|
+
|
14
|
+
typedef struct {
|
15
|
+
FridaDeviceManager *device_manager;
|
16
|
+
char *address;
|
17
|
+
} remove_remote_devices_proxy_args;
|
18
|
+
|
19
|
+
void define_DeviceManager();
|
20
|
+
VALUE DeviceManager_from_FridaDeviceManager(FridaDeviceManager *handle);
|
File without changes
|
File without changes
|
data/ext/c_frida/inc/GObject.h
CHANGED
File without changes
|
data/ext/c_frida/inc/IOStream.h
CHANGED
@@ -1,29 +1,29 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "c_frida.h"
|
4
|
-
|
5
|
-
extern VALUE mCFrida;
|
6
|
-
extern VALUE cIOStream;
|
7
|
-
|
8
|
-
typedef struct {
|
9
|
-
GObject_d base;
|
10
|
-
GInputStream *input;
|
11
|
-
GOutputStream *output;
|
12
|
-
} IOStream_d;
|
13
|
-
|
14
|
-
typedef struct {
|
15
|
-
GOutputStream *output;
|
16
|
-
char *data;
|
17
|
-
gsize size;
|
18
|
-
} write_proxy_args;
|
19
|
-
|
20
|
-
typedef struct {
|
21
|
-
GInputStream *input;
|
22
|
-
char *buffer;
|
23
|
-
gsize count;
|
24
|
-
} read_proxy_args;
|
25
|
-
|
26
|
-
void IOStream_free(IOStream_d *d);
|
27
|
-
|
28
|
-
void define_IOStream();
|
29
|
-
VALUE IOStream_from_GIOStream(GIOStream *stream);
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include "c_frida.h"
|
4
|
+
|
5
|
+
extern VALUE mCFrida;
|
6
|
+
extern VALUE cIOStream;
|
7
|
+
|
8
|
+
typedef struct {
|
9
|
+
GObject_d base;
|
10
|
+
GInputStream *input;
|
11
|
+
GOutputStream *output;
|
12
|
+
} IOStream_d;
|
13
|
+
|
14
|
+
typedef struct {
|
15
|
+
GOutputStream *output;
|
16
|
+
char *data;
|
17
|
+
gsize size;
|
18
|
+
} write_proxy_args;
|
19
|
+
|
20
|
+
typedef struct {
|
21
|
+
GInputStream *input;
|
22
|
+
char *buffer;
|
23
|
+
gsize count;
|
24
|
+
} read_proxy_args;
|
25
|
+
|
26
|
+
void IOStream_free(IOStream_d *d);
|
27
|
+
|
28
|
+
void define_IOStream();
|
29
|
+
VALUE IOStream_from_GIOStream(GIOStream *stream);
|
File without changes
|
File without changes
|
data/ext/c_frida/inc/Process.h
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "c_frida.h"
|
4
|
-
|
5
|
-
extern VALUE mCFrida;
|
6
|
-
extern VALUE cProcess;
|
7
|
-
|
8
|
-
void define_Process();
|
9
|
-
VALUE Process_from_FridaProcess(FridaProcess *handle);
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include "c_frida.h"
|
4
|
+
|
5
|
+
extern VALUE mCFrida;
|
6
|
+
extern VALUE cProcess;
|
7
|
+
|
8
|
+
void define_Process();
|
9
|
+
VALUE Process_from_FridaProcess(FridaProcess *handle);
|
data/ext/c_frida/inc/Relay.h
CHANGED
File without changes
|
data/ext/c_frida/inc/Script.h
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
#pragma once
|
2
|
-
|
3
|
-
#include "c_frida.h"
|
4
|
-
|
5
|
-
extern VALUE mCFrida;
|
6
|
-
extern VALUE cScript;
|
7
|
-
extern VALUE cGObject;
|
8
|
-
|
9
|
-
typedef struct {
|
10
|
-
FridaScript *handle;
|
11
|
-
uint port;
|
12
|
-
} enable_debugger_proxy_args;
|
13
|
-
|
14
|
-
typedef struct {
|
15
|
-
FridaScript *handle;
|
16
|
-
char * message;
|
17
|
-
GBytes * data;
|
18
|
-
} post_proxy_args;
|
19
|
-
|
20
|
-
void define_Script();
|
21
|
-
VALUE Script_from_FridaScript(FridaScript *handle);
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include "c_frida.h"
|
4
|
+
|
5
|
+
extern VALUE mCFrida;
|
6
|
+
extern VALUE cScript;
|
7
|
+
extern VALUE cGObject;
|
8
|
+
|
9
|
+
typedef struct {
|
10
|
+
FridaScript *handle;
|
11
|
+
uint port;
|
12
|
+
} enable_debugger_proxy_args;
|
13
|
+
|
14
|
+
typedef struct {
|
15
|
+
FridaScript *handle;
|
16
|
+
char * message;
|
17
|
+
GBytes * data;
|
18
|
+
} post_proxy_args;
|
19
|
+
|
20
|
+
void define_Script();
|
21
|
+
VALUE Script_from_FridaScript(FridaScript *handle);
|