Skip to content

Commit

Permalink
fix: fixed port scanner arguments parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Jul 30, 2024
1 parent 52cc6d9 commit 12df084
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/plugins/port_scanner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,12 @@ impl Plugin for PortScanner {
}

fn setup(&mut self, opts: &Options) -> Result<(), Error> {
self.ports = creds::parse_expression(Some(&opts.port_scanner.port_scanner_ports));
self.ports = if opts.username.is_some() {
creds::parse_expression(opts.username.as_ref())
} else {
creds::parse_expression(Some(&opts.port_scanner.port_scanner_ports))
};

if !matches!(
&self.ports,
Expression::Range {
Expand Down

0 comments on commit 12df084

Please sign in to comment.