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

Add support for [host|ip]:port #767

Merged
merged 23 commits into from
Aug 18, 2023
Merged

Add support for [host|ip]:port #767

merged 23 commits into from
Aug 18, 2023

Conversation

Mzack9999
Copy link
Member

@Mzack9999 Mzack9999 commented Aug 11, 2023

Description

This PR extends naabu capabilities to accept unitary input targets in the following formats:

ip:port
host:port

While other targets are network-coalesced into minimal range(s) and iterated randomly with blackrock cipher (just like masscan) picking randomly from vectorized ips and ports spaces, for these new items with port the flow should be the following:

  • No host discovery
  • Connect|Syn scan only towards the specific port

Example:

$ echo home.test:443 | sudo go run . -debug -verbose

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

                projectdiscovery.io

[INF] Current naabu version 2.1.6 (latest)
[INF] Running SYN scan with root privileges
[DBG] Received Transport (TCP) scan response from 192.168.1.1:443
[DBG] Received Transport (TCP) scan response from 192.168.1.1:443
[INF] Found 1 ports on host home.test (192.168.1.1)
home.test:443

Depends on:

Supersedes:

@Mzack9999 Mzack9999 self-assigned this Aug 11, 2023
@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Aug 18, 2023
@Mzack9999 Mzack9999 marked this pull request as ready for review August 18, 2023 11:15
@Mzack9999 Mzack9999 linked an issue Aug 18, 2023 that may be closed by this pull request
@Mzack9999 Mzack9999 mentioned this pull request Aug 18, 2023
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

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

naabu $echo google.com:443 | ./naabu 

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

		projectdiscovery.io

[INF] Current naabu version 2.1.6 (latest)
[INF] Running CONNECT scan with non root privileges
[INF] Found 1 ports on host google.com (142.250.194.238)
google.com:443
naabu $echo google.com:443 | sudo ./naabu 
Password:

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

		projectdiscovery.io

[INF] Current naabu version 2.1.6 (latest)
[INF] Running host discovery scan
[INF] Running SYN scan with root privileges
[INF] Found 1 ports on host google.com (142.250.194.238)
google.com:443
echo google.com:443 | ./naabu -p 80

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

		projectdiscovery.io

[INF] Current naabu version 2.1.6 (latest)
[INF] Running host discovery scan
[INF] Running SYN scan with root privileges
[INF] Found 2 ports on host google.com (216.58.196.206)
google.com:443
google.com:80

Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

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

LGTM !

@ehsandeep ehsandeep merged commit a5912e7 into dev Aug 18, 2023
5 checks passed
@ehsandeep ehsandeep deleted the feat-641-ip-port branch August 18, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for host|ip:port / port range input support
3 participants