diff --git a/implants/imix/src/tasks.rs b/implants/imix/src/tasks.rs index 35b228983..772020afb 100644 --- a/implants/imix/src/tasks.rs +++ b/implants/imix/src/tasks.rs @@ -13,7 +13,6 @@ use c2::pb::{ use chrono::Utc; use std::sync::mpsc::channel; use tokio::task; -use tonic::transport::Channel; use tonic::Status; pub async fn get_new_tasks( @@ -229,16 +228,11 @@ async fn send_tavern_output( #[cfg(test)] mod tests { use anyhow::Result; - use c2::pb::{Task, TaskOutput}; - use chrono::Utc; + use c2::pb::Task; use std::collections::HashMap; - use std::sync::mpsc::channel; - use std::thread; - use std::time::{Duration, Instant}; - use tokio::task; + use std::time::Instant; - use crate::exec::{handle_exec_timeout_and_response, AsyncTask}; - use crate::tasks::queue_task_output; + use crate::exec::AsyncTask; use crate::TaskID; use super::start_new_tasks; diff --git a/implants/lib/eldritch/src/sys/write_reg_hex_impl.rs b/implants/lib/eldritch/src/sys/write_reg_hex_impl.rs index aa6a6e8c4..9f42e3b67 100644 --- a/implants/lib/eldritch/src/sys/write_reg_hex_impl.rs +++ b/implants/lib/eldritch/src/sys/write_reg_hex_impl.rs @@ -1,5 +1,6 @@ use anyhow::Result; +#[allow(unused_variables)] pub fn write_reg_hex( reghive: String, regpath: String, @@ -93,15 +94,16 @@ pub fn write_reg_hex( #[cfg(test)] mod tests { - use super::*; - use std::str; - use uuid::Uuid; #[test] fn test_write_reg_hex() -> anyhow::Result<()> { #[cfg(target_os = "windows")] { + use super::*; + use std::str; + use uuid::Uuid; use winreg::{enums::*, RegKey}; + let id = Uuid::new_v4(); // -------------------- WRITE_REG_HEX TESTS --------------------------------------- diff --git a/implants/lib/eldritch/src/sys/write_reg_int_impl.rs b/implants/lib/eldritch/src/sys/write_reg_int_impl.rs index a7cda6cd2..9dffff65e 100644 --- a/implants/lib/eldritch/src/sys/write_reg_int_impl.rs +++ b/implants/lib/eldritch/src/sys/write_reg_int_impl.rs @@ -1,5 +1,6 @@ use anyhow::Result; +#[allow(unused_variables)] pub fn write_reg_int( reghive: String, regpath: String, @@ -85,15 +86,16 @@ pub fn write_reg_int( #[cfg(test)] mod tests { - use super::*; - use std::str; - use uuid::Uuid; #[test] fn test_write_reg_int() -> anyhow::Result<()> { #[cfg(target_os = "windows")] { + use super::*; + use std::str; + use uuid::Uuid; use winreg::{enums::*, RegKey}; + let id = Uuid::new_v4(); // -------------------- WRITE_REG_INT TESTS --------------------------------------- diff --git a/implants/lib/eldritch/src/sys/write_reg_str_impl.rs b/implants/lib/eldritch/src/sys/write_reg_str_impl.rs index b98edae6f..9d6fad6c0 100644 --- a/implants/lib/eldritch/src/sys/write_reg_str_impl.rs +++ b/implants/lib/eldritch/src/sys/write_reg_str_impl.rs @@ -1,5 +1,6 @@ use anyhow::Result; +#[allow(unused_variables)] pub fn write_reg_str( reghive: String, regpath: String, @@ -89,14 +90,14 @@ pub fn write_reg_str( #[cfg(test)] mod tests { - use super::*; - use std::str; - use uuid::Uuid; #[test] fn test_write_reg_str() -> anyhow::Result<()> { #[cfg(target_os = "windows")] { + use super::*; + use std::str; + use uuid::Uuid; use winreg::{enums::*, RegKey}; let id = Uuid::new_v4();