Skip to content

fix -exclude-ports for -passive#1004

Merged
ehsandeep merged 3 commits intodevfrom
fix_exclude_ports_for_passive
Mar 21, 2024
Merged

fix -exclude-ports for -passive#1004
ehsandeep merged 3 commits intodevfrom
fix_exclude_ports_for_passive

Conversation

@dogancanbakir
Copy link
Copy Markdown
Member

Closes #998.

before:

$ go run . -host hackerone.com -top-ports 1000 -exclude-ports 80,443 -passive -v

                  __
  ___  ___  ___ _/ /  __ __
 / _ \/ _ \/ _ \/ _ \/ // /
/_//_/\_,_/\_,_/_.__/\_,_/

                projectdiscovery.io

[INF] Current naabu version 2.3.0 (latest)
[INF] Running PASSIVE scan
hackerone.com:80
hackerone.com:443
hackerone.com:2053
hackerone.com:2082
hackerone.com:2083
hackerone.com:2086
hackerone.com:2087
hackerone.com:2096
hackerone.com:8080
hackerone.com:8443
hackerone.com:8880
[INF] Found 11 ports on host hackerone.com (104.18.36.214)

after:

$ go run . -host hackerone.com -top-ports 1000 -exclude-ports 80,443 -passive -v

                  __
  ___  ___  ___ _/ /  __ __
 / _ \/ _ \/ _ \/ _ \/ // /
/_//_/\_,_/\_,_/_.__/\_,_/

                projectdiscovery.io

[INF] Current naabu version 2.3.0 (latest)
[INF] Running PASSIVE scan
hackerone.com:2053
hackerone.com:2082
hackerone.com:2083
hackerone.com:2086
hackerone.com:2087
hackerone.com:2096
hackerone.com:8080
hackerone.com:8443
hackerone.com:8880
[INF] Found 9 ports on host hackerone.com (104.18.36.214)

Copy link
Copy Markdown
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ports can have the same syntax of nmap (ex. ranges), probably we can reuse the parsing logic at

func excludePorts(options *Options, ports []*port.Port) ([]*port.Port, error) {

What do you think?

@dogancanbakir dogancanbakir requested a review from Mzack9999 March 18, 2024 22:54
@ehsandeep ehsandeep merged commit a0814ee into dev Mar 21, 2024
@ehsandeep ehsandeep deleted the fix_exclude_ports_for_passive branch March 21, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-exclude-ports Flag Fails to Function Correctly When Used Alongside -passive Flag

3 participants