Skip to content

Commit

Permalink
refactor: 🔨 Clean existing comments, remove useless ones
Browse files Browse the repository at this point in the history
  • Loading branch information
AntwortEinesLebens committed Jun 11, 2024
1 parent 46370b4 commit 4e71912
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/malware/ads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// Alternate Data Stream
//
// Last update 20240224
Expand Down
1 change: 0 additions & 1 deletion src/malware/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// Mutex
//
// Last update 20240224
Expand Down
1 change: 0 additions & 1 deletion src/malware/namepipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// Name Pipe
//
// Last update 20240224
Expand Down
2 changes: 0 additions & 2 deletions src/malware/ppid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// PPID Spoofing
//
// Last update 20240224
Expand Down Expand Up @@ -38,7 +37,6 @@ pub struct PPID {
executable: String,
}

/* Use internal rust command */
fn get_user_pid() -> u32 {
let s: System = System::new_all();
let mut ppid_list: Vec<u32> = Vec::<u32>::new();
Expand Down
5 changes: 0 additions & 5 deletions src/malware/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// Load Vulnerable Driver
//
// Last update 20240224

// Windows API
use windows::core::{Result as WindowsResult, PCWSTR};
use windows::Win32::Security::SC_HANDLE;
use windows::Win32::System::Services::{
ControlService, CreateServiceW, DeleteService, OpenSCManagerW, StartServiceW,
ENUM_SERVICE_TYPE, SC_MANAGER_ALL_ACCESS, SERVICE_CONTROL_STOP, SERVICE_ERROR,
SERVICE_START_TYPE, SERVICE_STATUS,
};

// Some others
use crate::malware::tools::{process_is_admin, EXIST_ALL_GOOD, EXIST_TEST_ERROR};
use clap::Parser;
use std::{thread, time};
Expand Down Expand Up @@ -84,7 +80,6 @@ fn create_driver_service(name: &String, details: &String, path: &String) -> bool
};
}
Err(value) => {
// let error_code = unsafe { GetLastError() };
println!("Service Start failure with code : {:#06x}", value.code().0);
}
};
Expand Down
8 changes: 0 additions & 8 deletions src/malware/tools/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later

//
// Tools box
//
// std::process::exit need a i32
pub const EXIST_ALL_GOOD: i32 = 0;
pub const EXIST_CLI_ERROR: i32 = 10;
pub const EXIST_TEST_ERROR: i32 = 11;
Expand All @@ -15,7 +11,6 @@ use std::collections::HashSet;
use regex_generate::{Generator, DEFAULT_MAX_REPEAT};
use windows::Win32::UI::Shell::IsUserAnAdmin;

// File Creation
pub fn hex_to_bytes(s: &str) -> Option<Vec<u8>> {
if s.len() % 2 == 0 {
(0..s.len())
Expand All @@ -30,9 +25,6 @@ pub fn hex_to_bytes(s: &str) -> Option<Vec<u8>> {
}
}

/*
Some usefull fn
*/
pub fn regex_to_string(name: &String) -> String {
let mut gen: Generator<rand::rngs::ThreadRng> =
Generator::new(name, rand::thread_rng(), DEFAULT_MAX_REPEAT).unwrap();
Expand Down

0 comments on commit 4e71912

Please sign in to comment.