modified:   frida_client/src/client.rs
	modified:   frida_server/src/server.rs
This commit is contained in:
Michael Wain 2025-01-20 19:25:29 +03:00
parent 1b3cc1289a
commit 4db0dedfef
2 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,7 @@ pub mod general {
Some(h) => {
match h {
0 => {
// todo: reduce repeated code blocks count
let handshake = UDPVpnHandshake::deserialize(&(buf1[..l].to_vec()));
let mut k = [0u8; 32];
for (&x, p) in handshake.public_key.iter().zip(k.iter_mut()) {

View File

@ -207,6 +207,7 @@ pub async fn server_mode(server_config: ServerConfiguration, s_interface: Option
//info!("Got handshake from {:?}", handshake.request_ip);
let skey = BASE64_STANDARD.encode(&handshake.public_key);
if plp.iter().any(|c| c.ip == handshake.request_ip && c.public_key == skey) {
// todo: reduce repeated code blocks count
let internal_ip = IpAddr::V4(handshake.request_ip);
info!("Accepted client from {:?}", handshake.request_ip);
let mut k = [0u8; 32];