Skip to content

Commit

Permalink
refactor: 🔨 Remove abbreviation from the function's name
Browse files Browse the repository at this point in the history
AntwortEinesLebens committed Jul 1, 2024
1 parent b45f3c6 commit 6051126
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/malware/file.rs
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ You can use `SET | more` or `Get-ChildItem Env:` to get the list
*/

use crate::windows::users::is_admin;
use crate::windows::users::is_administrator;
use base64::engine::{general_purpose, Engine};
use clap::Parser;
use regex_generate::{Generator, DEFAULT_MAX_REPEAT};
@@ -89,7 +89,7 @@ fn create_file(fullpath: String, hex_data: Vec<u8>) -> bool {
impl FileCreate {
pub fn run(&self) -> i32 {
if self.admin
&& !match is_admin() {
&& !match is_administrator() {
Ok(is_admin) => is_admin,
Err(error) => {
println!(
4 changes: 2 additions & 2 deletions src/malware/service.rs
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
//
// Last update 20240224

use crate::windows::users::is_admin;
use crate::windows::users::is_administrator;
use clap::Parser;
use std::{thread, time};
use windows::core::{Result as WindowsResult, PCWSTR};
@@ -116,7 +116,7 @@ impl BYOVD {
pub fn run(&self) -> i32 {
println!("Bring Your Own Vulnerable Driver");

if !match is_admin() {
if !match is_administrator() {
Ok(is_admin) => is_admin,
Err(error) => {
println!(
2 changes: 1 addition & 1 deletion src/windows/users.rs
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ use windows::{
},
};

pub fn is_admin() -> Result<bool, WindowsError> {
pub fn is_administrator() -> Result<bool, WindowsError> {
let is_admin: *mut BOOL = &mut BOOL::from(false);
let mut administrators_group: PSID = PSID::default();

0 comments on commit 6051126

Please sign in to comment.