Skip to content

Commit

Permalink
run cargo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-zip committed Nov 26, 2023
1 parent df6f5e0 commit d0f2f97
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions maid_runner/src/core/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ pub fn format_std(data: String) -> Vec<String> {
}

pub fn logger(data: Logger) -> std::io::Result<()> {
let mut formated_stdout: Vec<String> = format_std(data.stdout);
let mut formated_stderr: Vec<String> = format_std(data.stderr);
let formated_stdout: Vec<String> = format_std(data.stdout);
let formated_stderr: Vec<String> = format_std(data.stderr);

let cmd: Vec<String> = data.source.split_whitespace().map(String::from).collect();

Expand Down Expand Up @@ -125,7 +125,7 @@ pub fn logger(data: Logger) -> std::io::Result<()> {
Ok(conn) => {
let _ = write_process_result_to_db(&conn, proccess_result);
}
Err(err) => {
Err(_err) => {
standard_messages("error", "Database connection failed", "report.logger", "cute");
}
}
Expand Down
2 changes: 1 addition & 1 deletion maid_runner/src/core/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ pub fn find_all_matching_lines(file_path: &str, pattern: &str) -> Result<Vec<Str
Ok(matching_lines)
}

pub fn read_file_to_string(file_path: &str, debug: bool) -> String {
pub fn read_file_to_string(file_path: &str, _debug: bool) -> String {
match File::open(file_path) {
Ok(file) => {
use std::io::Read;
Expand Down
2 changes: 1 addition & 1 deletion maid_runner/src/modules/lookup/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::meow::meow::read_meow;
use crate::modules::lookup::lookup_structs::*;

pub fn lookup_mac_address(mac_address: LookupMacAddress, debug: bool) -> bool {
let mut file: String;
let file: String;

if mac_address.list_path == "default" {
let config = read_meow("/var/maid/maid_lists/embedded/config.meow", false);
Expand Down
2 changes: 1 addition & 1 deletion maid_runner/src/modules/maid_av/entropy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub fn entropy_filter(line: String) -> HashMap<&'static str, f64> {
return entropy_result;
}

pub fn entropy_analysis(content: String, debug: bool) -> bool {
pub fn entropy_analysis(content: String, _debug: bool) -> bool {
let mut final_entropy_general_possitive: f64 = 0.0;
let mut final_entropy_letters_possitive: f64 = 0.0;
let mut final_entropy_numbers_possitive: f64 = 0.0;
Expand Down
4 changes: 2 additions & 2 deletions maid_runner/src/modules/maid_av/maid_av.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub fn search_malware_hash(search_term: &str, debug: bool) -> bool {
}
}

pub fn search_malware_pattern(pattern: &str, debug: bool) -> bool {
pub fn search_malware_pattern(pattern: &str, _debug: bool) -> bool {
let config = read_meow("/var/maid/maid_lists/embedded/config.meow", false);
let malware_db = &format!("{}{}", config["GENRAL_BASE_PATH"], config["MALWARE_HASH"]);

Expand Down Expand Up @@ -114,7 +114,7 @@ pub fn active_malware_scanner(derectory: &str, debug: bool) -> bool {

match list_files_and_folders(derectory) {
Ok(items) => {
for item in items {
for _item in items {
match calculate_sha256_hash("/bin/yes", true) {
Ok(result) => {
return search_malware_pattern(&result, debug);
Expand Down

0 comments on commit d0f2f97

Please sign in to comment.