Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix -exclude-ports for -passive #1004

Merged
merged 3 commits into from Mar 21, 2024
Merged

Conversation

dogancanbakir
Copy link
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
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?

@ehsandeep ehsandeep merged commit a0814ee into dev Mar 21, 2024
9 checks passed
@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