Skip to content

Commit 6680b48

Browse files
authored
fix(frida): pass custom send message to message handler (#216)
1 parent fbe54fb commit 6680b48

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

frida-gum-sys/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1+
frida-gum.h
12
libfrida-gum.a
3+
frida-gum.lib
24
frida-gum-example.c
5+
6+
frida-gumjs.h
7+
libfrida-gumjs.a
8+
frida-gumjs.lib
9+
frida-gumjs-example.c

frida-sys/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
frida-core.h
12
libfrida-core.a
3+
frida-core.lib
24
frida-core-example.c

frida/src/script.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,9 @@ unsafe extern "C" fn call_on_message<I: ScriptHandler>(
112112
});
113113

114114
match formatted_msg {
115-
Message::Send(msg) => {
116-
if msg.payload.r#type == "frida:rpc" {
117-
let callback_handler: *mut CallbackHandler = user_data as _;
118-
on_message(callback_handler.as_mut().unwrap(), Message::Send(msg));
119-
}
115+
Message::Send(ref msg) if msg.payload.r#type == "frida:rpc" => {
116+
let callback_handler: *mut CallbackHandler = user_data as _;
117+
on_message(callback_handler.as_mut().unwrap(), formatted_msg);
120118
}
121119
_ => {
122120
let handler: &mut I = &mut *(user_data as *mut I);

0 commit comments

Comments
 (0)