From da375d3914cabf289520319366039ff8ef07f04f Mon Sep 17 00:00:00 2001 From: AntwortEinesLebens Date: Sun, 3 Nov 2024 17:23:42 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Rename=20actions=20to=20tra?= =?UTF-8?q?ces?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cli.rs | 4 ++-- src/main.rs | 6 +++--- src/{actions.rs => traces.rs} | 6 +++--- src/{actions => traces}/drivers.rs | 2 +- src/{actions => traces}/drivers/byovd.rs | 2 +- src/{actions => traces}/processes.rs | 2 +- src/{actions => traces}/processes/spoofing.rs | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) rename src/{actions.rs => traces.rs} (86%) rename src/{actions => traces}/drivers.rs (91%) rename src/{actions => traces}/drivers/byovd.rs (97%) rename src/{actions => traces}/processes.rs (90%) rename src/{actions => traces}/processes/spoofing.rs (98%) diff --git a/src/cli.rs b/src/cli.rs index 2435314..809dd46 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -use crate::actions::Actions; +use crate::traces::Traces; use clap::{Parser, Subcommand}; #[derive(Debug, Parser)] @@ -15,5 +15,5 @@ pub struct Arguments { #[derive(Debug, Subcommand)] pub enum Commands { - Actions(Actions), + Traces(Traces), } diff --git a/src/main.rs b/src/main.rs index 1269fe8..0346365 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,14 +2,14 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -mod actions; mod cli; +mod traces; mod windows; -use actions::Runnable; use clap::Parser; use cli::{Arguments, Commands}; use std::error::Error; +use traces::Runnable; fn banner() { let banner: &str = " @@ -28,7 +28,7 @@ fn main() -> Result<(), Box> { banner(); match Arguments::parse().command { - Commands::Actions(action) => action.run()?, + Commands::Traces(action) => action.run()?, }; Ok(()) diff --git a/src/actions.rs b/src/traces.rs similarity index 86% rename from src/actions.rs rename to src/traces.rs index 35e8bca..348620b 100644 --- a/src/actions.rs +++ b/src/traces.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -use crate::actions::{drivers::Drivers, processes::Processes}; +use crate::traces::{drivers::Drivers, processes::Processes}; use clap::{Args, Subcommand}; use std::error::Error; @@ -10,7 +10,7 @@ pub mod drivers; pub mod processes; #[derive(Debug, Args)] -pub struct Actions { +pub struct Traces { #[clap(subcommand)] pub command: Commands, } @@ -25,7 +25,7 @@ pub trait Runnable { fn run(&self) -> Result<(), Box>; } -impl Runnable for Actions { +impl Runnable for Traces { fn run(&self) -> Result<(), Box> { match &self.command { Commands::Drivers(drivers) => drivers as &dyn Runnable, diff --git a/src/actions/drivers.rs b/src/traces/drivers.rs similarity index 91% rename from src/actions/drivers.rs rename to src/traces/drivers.rs index c25312f..64f5827 100644 --- a/src/actions/drivers.rs +++ b/src/traces/drivers.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -use crate::actions::{drivers::byovd::Byovd, Runnable}; +use crate::traces::{drivers::byovd::Byovd, Runnable}; use clap::{Args, Subcommand}; use std::error::Error; diff --git a/src/actions/drivers/byovd.rs b/src/traces/drivers/byovd.rs similarity index 97% rename from src/actions/drivers/byovd.rs rename to src/traces/drivers/byovd.rs index b5ce606..b3ca762 100644 --- a/src/actions/drivers/byovd.rs +++ b/src/traces/drivers/byovd.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -use crate::{actions::Runnable, windows::users::is_administrator}; +use crate::{traces::Runnable, windows::users::is_administrator}; use clap::Parser; use std::{error::Error, path::PathBuf}; use windows::{ diff --git a/src/actions/processes.rs b/src/traces/processes.rs similarity index 90% rename from src/actions/processes.rs rename to src/traces/processes.rs index ac5b4a1..97e2f38 100644 --- a/src/actions/processes.rs +++ b/src/traces/processes.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -use crate::actions::{processes::spoofing::Spoofing, Runnable}; +use crate::traces::{processes::spoofing::Spoofing, Runnable}; use clap::{Args, Subcommand}; use std::error::Error; diff --git a/src/actions/processes/spoofing.rs b/src/traces/processes/spoofing.rs similarity index 98% rename from src/actions/processes/spoofing.rs rename to src/traces/processes/spoofing.rs index 5a87902..d0d622b 100644 --- a/src/actions/processes/spoofing.rs +++ b/src/traces/processes/spoofing.rs @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -use crate::{actions::Runnable, windows::processes::get_pid}; +use crate::{traces::Runnable, windows::processes::get_pid}; use clap::Parser; use std::{ error::Error, ffi::OsString, iter::once, mem::size_of, os::windows::ffi::OsStrExt,