Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
  • Loading branch information
exersalza committed May 31, 2024
1 parent cb899fd commit c1e665f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions cipher_finder/src/file_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ impl ScannedFile {
if scan_mode.eq(&ScanLevel::Aggressive) {
println!("aggressive mode active");
}

self.add_infected(ln, line, check_regex(&CIPHER_REGEX, line));
self.add_infected(ln, line, check_regex(&SIMPLE_URL_REGEX, line));
}
Expand Down
21 changes: 21 additions & 0 deletions cipher_finder/src/log.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pub enum Verbosity {
None,
Verbose,
VeryVerbose,
}

pub struct Logging {
mode: Verbosity,
}

impl Logging {
pub fn new(verbose: bool, very_verbose: bool) -> Self {
let mode = match (very_verbose, verbose) {
(true, _) => Verbosity::VeryVerbose,
(false, true) => Verbosity::Verbose,
(false, false) => Verbosity::None,
};

Self { mode }
}
}
1 change: 1 addition & 0 deletions cipher_finder/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::file_op::ScannedFile;

pub mod de_obfs;
pub mod file_op;
pub mod log;
pub mod os;
pub mod utils;

Expand Down

0 comments on commit c1e665f

Please sign in to comment.