Skip to content

Commit

Permalink
Merge pull request #13 from frack113/refactor/modules
Browse files Browse the repository at this point in the history
Refactor/modules
  • Loading branch information
frack113 authored Jun 11, 2024
2 parents f0e11df + c641df4 commit d7c0e7d
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 20 deletions.
14 changes: 7 additions & 7 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
*/

use crate::commands::ads::ADS;
use crate::commands::file::FileCreate;
use crate::commands::mutex::Mutex;
use crate::commands::namepipe::NamePipe;
use crate::commands::ppid::PPID;
use crate::commands::service::BYOVD;
use crate::malware::ads::ADS;
use crate::malware::file::FileCreate;
use crate::malware::mutex::Mutex;
use crate::malware::namepipe::NamePipe;
use crate::malware::ppid::PPID;
use crate::malware::service::BYOVD;
use clap::Parser;

#[derive(Parser)]
Expand Down Expand Up @@ -46,7 +46,7 @@ impl Arguments {
}

#[derive(Parser)]
pub enum Commands {
enum Commands {
#[clap(arg_required_else_help = true)]
FileCreate(FileCreate),
#[clap(arg_required_else_help = true)]
Expand Down
6 changes: 0 additions & 6 deletions src/lib.rs

This file was deleted.

4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
Working date: 2023-08
*/

use wag::cli::Arguments;
mod cli;
mod malware;

use cli::Arguments;
use clap::Parser;

fn banner() {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/ads.rs → src/malware/ads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// Last update 20240224

use crate::commands::tools::{
use crate::malware::tools::{
hex_to_bytes, regex_to_string, EXIST_ALL_GOOD, EXIST_CLI_ERROR, EXIST_TEST_ERROR,
};

Expand Down
2 changes: 1 addition & 1 deletion src/commands/file.rs → src/malware/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can use `SET | more` or `Get-ChildItem Env:` to get the list
*/

use crate::commands::tools::{
use crate::malware::tools::{
hex_to_bytes, process_is_admin, regex_to_string, EXIST_ALL_GOOD, EXIST_TEST_ERROR,
};
use clap::Parser;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/commands/mutex.rs → src/malware/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use windows::core::{Result as WindowsResult, PCSTR};
use windows::Win32::Foundation::{CloseHandle, HANDLE};
use windows::Win32::System::Threading::CreateMutexA;

use crate::commands::tools::{regex_to_string, EXIST_ALL_GOOD};
use crate::malware::tools::{regex_to_string, EXIST_ALL_GOOD};
use clap::Parser;
use std::{thread, time};

Expand Down
2 changes: 1 addition & 1 deletion src/commands/namepipe.rs → src/malware/namepipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use windows::Win32::Foundation::{CloseHandle, HANDLE};
use windows::Win32::Storage::FileSystem::PIPE_ACCESS_DUPLEX;
use windows::Win32::System::Pipes::{CreateNamedPipeA, PIPE_TYPE_MESSAGE};

use crate::commands::tools::{regex_to_string, EXIST_ALL_GOOD};
use crate::malware::tools::{regex_to_string, EXIST_ALL_GOOD};
use clap::Parser;
use std::{thread, time};

Expand Down
2 changes: 1 addition & 1 deletion src/commands/ppid.rs → src/malware/ppid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//
// Last update 20240224

use crate::commands::tools::{EXIST_ALL_GOOD, EXIST_TEST_ERROR};
use crate::malware::tools::{EXIST_ALL_GOOD, EXIST_TEST_ERROR};
use clap::Parser;

use rand::prelude::SliceRandom;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/service.rs → src/malware/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use windows::Win32::System::Services::{
};

// Some others
use crate::commands::tools::{process_is_admin, EXIST_ALL_GOOD, EXIST_TEST_ERROR};
use crate::malware::tools::{process_is_admin, EXIST_ALL_GOOD, EXIST_TEST_ERROR};
use clap::Parser;
use std::{thread, time};

Expand Down
File renamed without changes.

0 comments on commit d7c0e7d

Please sign in to comment.