Frida/frida_core/src/main.rs
alterdekim 32eec5252a
Some checks failed
gitea/Frida/pipeline/head There was a failure building this commit
Implementing linux tun adapter
new file:   frida_core/src/linux_tun.rs
	modified:   frida_core/src/main.rs
	modified:   frida_core/src/win_tun.rs
2024-12-08 04:02:17 +03:00

35 lines
716 B
Rust

use env_logger::Builder;
use log::{info, error, LevelFilter};
mod device;
mod tun;
#[cfg(target_os = "windows")]
mod win_tun;
#[cfg(target_os = "linux")]
mod linux_tun;
#[tokio::main]
async fn main() {
Builder::new()
.filter(None, LevelFilter::Info)
.init();
let (reader, writer) = tun::create_tun();
let a = tokio::spawn(async move {
let mut buf = Vec::new();
info!("Started!");
loop {
// info!("We've got {} bytes of data!", c)
let r = reader.read(&mut buf).await;
match r {
Ok(c) => {},
Err(e) => error!("We've got a nasty error message!")
}
}
});
a.await;
}