Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn main() {
let config = Config::read(opts.config_path.clone());
opts.merge(&config);

debug!("Main() `opts` arguments are {:?}", opts);
debug!("Main() `opts` arguments are {opts:?}");

let scripts_to_run: Vec<ScriptFile> = match init_scripts(&opts.scripts) {
Ok(scripts_to_run) => scripts_to_run,
Expand Down Expand Up @@ -94,7 +94,7 @@ fn main() {
opts.exclude_ports.unwrap_or_default(),
opts.udp,
);
debug!("Scanner finished building: {:?}", scanner);
debug!("Scanner finished building: {scanner:?}");

let mut portscan_bench = NamedTimer::start("Portscan");
let scan_result = block_on(scanner.run());
Expand Down Expand Up @@ -146,7 +146,7 @@ fn main() {
// This part allows us to add commandline arguments to the Script call_format, appending them to the end of the command.
if !opts.command.is_empty() {
let user_extra_args = &opts.command.join(" ");
debug!("Extra args vec {:?}", user_extra_args);
debug!("Extra args vec {user_extra_args:?}");
if script_f.call_format.is_some() {
let mut call_f = script_f.call_format.unwrap();
call_f.push(' ');
Expand All @@ -156,7 +156,7 @@ fn main() {
opts.greppable,
opts.accessible
);
debug!("Call format {}", call_f);
debug!("Call format {call_f}");
script_f.call_format = Some(call_f);
}
}
Expand Down Expand Up @@ -187,7 +187,7 @@ fn main() {
benchmarks.push(script_bench);
rustscan_bench.end();
benchmarks.push(rustscan_bench);
debug!("Benchmarks raw {:?}", benchmarks);
debug!("Benchmarks raw {benchmarks:?}");
info!("{}", benchmarks.summary());
}

Expand Down
4 changes: 2 additions & 2 deletions src/scripts/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ fn execute_script(script: &str) -> Result<String> {
Ok(String::from_utf8_lossy(&output.stdout).into_owned())
}
Err(error) => {
debug!("Command error {}", error.to_string());
debug!("Command error {}", error);
Err(anyhow!(error.to_string()))
}
}
Expand Down Expand Up @@ -373,7 +373,7 @@ impl ScriptFile {
Some(parsed)
}
Err(e) => {
debug!("Failed to parse ScriptFile headers {}", e.to_string());
debug!("Failed to parse ScriptFile headers {}", e);
None
}
}
Expand Down
Loading