Comments (5)
Ah, you're just not linking libresolv
, you can do so like this in the build.rs
:
println!("cargo:rustc-link-lib=resolv");
I encourage you to contribute to this bindings monorepo as the goal is to eventually upstream them into the Frida organization.
from frida-rust.
I do plan on writing frida-core bindings, if you're interested in working on them now I'm happy to get you started. I will add a frida-core-sys
package to this repo.
from frida-rust.
Ok, this should get you started: 6db9961.
I've added frida-core
, frida-core-sys
and an example for you (that you can use for development).
If you need any help, let me know 😄
from frida-rust.
For reference, these are the kinds of errors I'm getting
= note: /usr/bin/ld: /home/oem/github/frida-rust/frida-gum-sys/libfrida-core.a(gthreadedresolver.c.o): in function `do_lookup_records':
/worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:984: undefined reference to `__res_nquery'
/usr/bin/ld: /home/oem/github/frida-rust/frida-gum-sys/libfrida-core.a(gthreadedresolver.c.o): in function `g_resolver_records_from_res_query':
/worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:702: undefined reference to `__dn_expand'
/usr/bin/ld: /worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:713: undefined reference to `__dn_expand'
/usr/bin/ld: /home/oem/github/frida-rust/frida-gum-sys/libfrida-core.a(gthreadedresolver.c.o): in function `parse_res_soa':
/worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:561: undefined reference to `__dn_expand'
/usr/bin/ld: /worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:562: undefined reference to `__dn_expand'
/usr/bin/ld: /home/oem/github/frida-rust/frida-gum-sys/libfrida-core.a(gthreadedresolver.c.o): in function `parse_res_srv':
/worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:543: undefined reference to `__dn_expand'
/usr/bin/ld: /home/oem/github/frida-rust/frida-gum-sys/libfrida-core.a(gthreadedresolver.c.o):/worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:602: more undefined references to `__dn_expand' follow
collect2: error: ld returned 1 exit status
from frida-rust.
Hey,
Thanks quick response. I had created a skeleton like the one you pushed before I started encountering these errors, but perhaps this is still something you can help with. The errors don't start occurring until after adding some calls to the sys crate. For example, if in your code, I add the following test
function to the Frida struct
impl Frida {
/// Obtain a Frida handle, ensuring that the runtime is properly initialized. This may
/// be called as many times as needed, and results in a no-op if the Frida runtime is
/// already initialized.
pub fn obtain() -> Frida {
unsafe { sys::frida_init() };
Frida {
}
}
pub fn test() {
unsafe {
let _main_loop = sys::_frida_g_main_loop_new(std::ptr::null_mut(), 1);
let _manager = sys::frida_device_manager_new();
}
}
}
Then include the crate in another and build it, I get the same error as above
= note: /usr/bin/ld: /home/oem/github/frida-rust/frida-gum-sys/libfrida-core.a(gthreadedresolver.c.o): in function `do_lookup_records':
/worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:984: undefined reference to `__res_nquery'
/usr/bin/ld: /home/oem/github/frida-rust/frida-gum-sys/libfrida-core.a(gthreadedresolver.c.o): in function `g_resolver_records_from_res_query':
/worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:702: undefined reference to `__dn_expand'
/usr/bin/ld: /worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:713: undefined reference to `__dn_expand'
/usr/bin/ld: /home/oem/github/frida-rust/frida-gum-sys/libfrida-core.a(gthreadedresolver.c.o): in function `parse_res_soa':
/worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:561: undefined reference to `__dn_expand'
/usr/bin/ld: /worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:562: undefined reference to `__dn_expand'
/usr/bin/ld: /home/oem/github/frida-rust/frida-gum-sys/libfrida-core.a(gthreadedresolver.c.o): in function `parse_res_srv':
/worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:543: undefined reference to `__dn_expand'
/usr/bin/ld: /home/oem/github/frida-rust/frida-gum-sys/libfrida-core.a(gthreadedresolver.c.o):/worker/frida-manylinux-x86_64/build/build/fs-tmp-linux-x86_64/glib/../../../deps/glib/gio/gthreadedresolver.c:602: more undefined references to `__dn_expand' follow
collect2: error: ld returned 1 exit status
from frida-rust.
Related Issues (20)
- frida-gum Transformer callback API is unsound
- Why not support rpc call like golang/python? HOT 4
- backtrace is not supported on Windows. Why? HOT 2
- Request for Windows Example for Hooking Functions HOT 1
- Returning a released pointer from RangeDetails::with_address HOT 6
- frida-gum: Cannot find function `g_object_unref` in crate `gum_sys` on aarch64-linux-android HOT 1
- use rustls for downloading? HOT 4
- crates.io isn't updated? HOT 2
- release frida-gum-sys / frida-build HOT 7
- Frida-core.h file not found, both auto-download and manual install do not solve the problem. HOT 2
- Injector does segfault HOT 3
- Injector crash the process on windows HOT 1
- frida-gum: InvocationListener and ProbeListener signature issues HOT 1
- Why are there lifetimes on objects? HOT 12
- Listing processes from all devices causes accces violation
- Calling 2 times Frida::obtain() cause ACCESS_VIOLATION HOT 3
- Injected library lifecycle management? HOT 6
- memory leak with Interceptor listeners HOT 1
- frida-gum: add std feature
- frida-gum API allows some memory safety mistakes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frida-rust.