Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions implants/imix/src/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 5 additions & 3 deletions implants/lib/eldritch/src/sys/write_reg_hex_impl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use anyhow::Result;

#[allow(unused_variables)]
pub fn write_reg_hex(
reghive: String,
regpath: String,
Expand Down Expand Up @@ -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 ---------------------------------------
Expand Down
8 changes: 5 additions & 3 deletions implants/lib/eldritch/src/sys/write_reg_int_impl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use anyhow::Result;

#[allow(unused_variables)]
pub fn write_reg_int(
reghive: String,
regpath: String,
Expand Down Expand Up @@ -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 ---------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions implants/lib/eldritch/src/sys/write_reg_str_impl.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use anyhow::Result;

#[allow(unused_variables)]
pub fn write_reg_str(
reghive: String,
regpath: String,
Expand Down Expand Up @@ -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();

Expand Down