binary data transfer, begin CLI, packet routing

This commit is contained in:
Michael Mikovsky
2025-06-12 05:44:54 -06:00
parent aea44b75a2
commit d7f350bd40
21 changed files with 457 additions and 260 deletions
+33
View File
@@ -0,0 +1,33 @@
use std::net::SocketAddr;
use unshell_rs_lib::{
Error,
nodes::{ConnectionConfig, Node},
};
use crate::C2Packet;
pub fn run_endpoint(socket: SocketAddr) -> Result<(), Error> {
let node = Node::<C2Packet>::run_node(
"Server".to_string(),
vec![],
vec![ConnectionConfig {
socket,
layers: vec![],
}],
)?;
loop {
match node.rx.recv()? {
C2Packet::Aa => {
info!("1");
}
C2Packet::Bb => {
info!("2");
}
C2Packet::Cc => {
info!("3");
}
}
}
}