Code:
use hook_inject::{Process, Library, inject_process, InjectedProcess};
pub async fn inject(process_id: i32, file_path: String) -> Result<InjectedProcess, String> {
let process = match Process::from_pid(process_id) {
Ok(process) => process,
Err(e) => return Err(format!("Incorrect process id: {}, got error: {}", process_id, e))
};
let library = match Library::from_path(&file_path) {
Ok(library) => library,
Err(e) => return Err(format!("Incorrect library path: {}, got error: {}", file_path, e))
};
let injected_library = match inject_process(process, library) {
Ok(injected_library) => injected_library,
Err(e) => return Err(format!("Can't inject library, got error: {}. The library may inject, but you will unable to uninject it.", e))
};
return Ok(injected_library);
}
Im getting error at inject_process it says /proc/self/fd/3: undefined symbol: frida_agent_main
OS: Linux fedora 6.17.8-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 14 04:52:44 UTC 2025 x86_64 GNU/Linux
But it inject the library with no problems so idk what happens
Anyway the library is still cool
Code:
use hook_inject::{Process, Library, inject_process, InjectedProcess};
pub async fn inject(process_id: i32, file_path: String) -> Result<InjectedProcess, String> {
let process = match Process::from_pid(process_id) {
Ok(process) => process,
Err(e) => return Err(format!("Incorrect process id: {}, got error: {}", process_id, e))
};
let library = match Library::from_path(&file_path) {
Ok(library) => library,
Err(e) => return Err(format!("Incorrect library path: {}, got error: {}", file_path, e))
};
let injected_library = match inject_process(process, library) {
Ok(injected_library) => injected_library,
Err(e) => return Err(format!("Can't inject library, got error: {}. The library may inject, but you will unable to uninject it.", e))
};
return Ok(injected_library);
}
Im getting error at inject_process it says /proc/self/fd/3: undefined symbol: frida_agent_main
OS: Linux fedora 6.17.8-200.fc42.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 14 04:52:44 UTC 2025 x86_64 GNU/Linux
But it inject the library with no problems so idk what happens
Anyway the library is still cool