diff --git a/memflow-pcileech/Cargo.toml b/memflow-pcileech/Cargo.toml index 35fde2c..0ca7adf 100644 --- a/memflow-pcileech/Cargo.toml +++ b/memflow-pcileech/Cargo.toml @@ -18,12 +18,12 @@ crate-type = ["lib", "cdylib"] [dependencies] memflow = { git = "https://github.com/memflow/memflow", branch = "next", features = ["plugins", "memmapfiles"] } log = { version = "0.4", default-features = false } -simple_logger = "1.0" leechcore-sys = { path = "../leechcore-sys" } [dev-dependencies] clap = "2.33" -memflow-win32 = { git = "https://github.com/memflow/memflow", branch = "next" } +simple_logger = "1.0" +memflow-win32 = { git = "https://github.com/memflow/memflow-win32", branch = "main" } [features] default = [] diff --git a/memflow-pcileech/examples/ps_win32.rs b/memflow-pcileech/examples/ps_win32.rs index 923030e..6795495 100644 --- a/memflow-pcileech/examples/ps_win32.rs +++ b/memflow-pcileech/examples/ps_win32.rs @@ -32,7 +32,7 @@ fn main() { Args::new().insert("device", "FPGA") }; - let connector = memflow_pcileech::create_connector(&connector_args, Level::Debug) + let connector = memflow_pcileech::create_connector(&connector_args) .expect("unable to create pcileech connector"); let mut os = Win32Kernel::builder(connector) diff --git a/memflow-pcileech/examples/read_phys.rs b/memflow-pcileech/examples/read_phys.rs index 1a09b00..effd309 100644 --- a/memflow-pcileech/examples/read_phys.rs +++ b/memflow-pcileech/examples/read_phys.rs @@ -22,7 +22,7 @@ fn main() { Args::new().insert("device", "FPGA") }; - let mut connector = memflow_pcileech::create_connector(&connector_args, Level::Debug) + let mut connector = memflow_pcileech::create_connector(&connector_args) .expect("unable to create pcileech connector"); let metadata = connector.metadata(); diff --git a/memflow-pcileech/src/lib.rs b/memflow-pcileech/src/lib.rs index f7dfdad..760668e 100644 --- a/memflow-pcileech/src/lib.rs +++ b/memflow-pcileech/src/lib.rs @@ -5,7 +5,7 @@ use std::ptr; use std::slice; use std::sync::{Arc, Mutex}; -use log::{error, info, Level}; +use log::{error, info}; use memflow::cglue; use memflow::mem::phys_mem::*; @@ -424,14 +424,9 @@ fn validator() -> ArgsValidator { /// Creates a new PciLeech Connector instance. #[connector(name = "pcileech", help_fn = "help", target_list_fn = "target_list")] -pub fn create_connector(args: &Args, log_level: Level) -> Result { - simple_logger::SimpleLogger::new() - .with_level(log_level.to_level_filter()) - .init() - .ok(); - +pub fn create_connector(args: &Args) -> Result { let validator = validator(); - match validator.validate(&args) { + match validator.validate(args) { Ok(_) => { let device = args .get("device")