modified: src/client.rs
All checks were successful
gitea/Frida-android-native/pipeline/head This commit looks good

modified:   src/main.rs
	modified:   src/mobile.rs
This commit is contained in:
Michael Wain 2024-10-12 06:05:20 +03:00
parent a6d07e18dc
commit e2559ce7a6
3 changed files with 5 additions and 5 deletions

View File

@ -24,7 +24,7 @@ use network_interface::NetworkInterfaceConfig;
use robusta_jni::jni::JNIEnv;
use crate::jni::FridaLib;
pub async fn client_mode(client_config: ClientConfiguration, fd: i32, env: &JNIEnv<'_>, close_token: CancellationToken) {
pub async fn client_mode(client_config: ClientConfiguration, fd: i32, /*env: &JNIEnv<'_>,*/ close_token: CancellationToken) {
let (ltx, lrx) = unbounded::<Vec<u8>>();
ltx.send("Starting client...".as_bytes().to_vec());
@ -136,7 +136,7 @@ pub async fn client_mode(client_config: ClientConfiguration, fd: i32, env: &JNIE
}
}
if let Ok(bytes) = lrx.try_recv() {
FridaLib::traceFromNative(&env, String::from_utf8_lossy(&bytes).to_string());
//FridaLib::traceFromNative(&env, String::from_utf8_lossy(&bytes).to_string());
}
if let Ok(bytes) = mx.try_recv() {
let s_c = s_cipher.lock().await;

View File

@ -65,7 +65,7 @@ mod jni {
FridaLib::traceFromNative(env, format!("main loop error: {}", err));
return Err(err);
}*/
mobile::mobile_run(config_b32, close_fd_on_drop, tun_fd, env, close_token).await;
mobile::mobile_run(config_b32, close_fd_on_drop, tun_fd, /*env, */close_token).await;
};
let exit_code = match tokio::runtime::Builder::new_multi_thread().enable_all().build() {

View File

@ -5,7 +5,7 @@ use jni::sys::jint;
use tokio::runtime::Runtime;
use robusta_jni::jni::JNIEnv;
pub async fn mobile_run(cfg_raw: String, close_fd_on_drop: bool, tun_fd: i32, env: &JNIEnv<'_>, close_token: tokio_util::sync::CancellationToken) {
pub async fn mobile_run(cfg_raw: String, close_fd_on_drop: bool, tun_fd: i32, /*env: &JNIEnv<'_>,*/ close_token: tokio_util::sync::CancellationToken) {
let config: ClientConfiguration = serde_yaml::from_slice(hex::decode(cfg_raw).unwrap().as_slice()).expect("Bad client config file structure");
client::client_mode(config, tun_fd, env, close_token).await;
client::client_mode(config, tun_fd, /*env, */close_token).await;
}