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

Adding support for hostnames #823

Merged
merged 2 commits into from
Oct 10, 2023
Merged

Adding support for hostnames #823

merged 2 commits into from
Oct 10, 2023

Conversation

Mzack9999
Copy link
Member

@Mzack9999 Mzack9999 commented Oct 9, 2023

Closes #821

$ echo www.scanme.sh | go run . -exclude-hosts scanme.sh -p 80 -verbose

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

                projectdiscovery.io

[INF] Current naabu version 2.1.8 (latest)
[WRN] Skipping host www.scanme.sh as ip 128.199.158.128 was excluded
[INF] Running CONNECT scan with non root privileges
[FTL] Could not run enumeration: no valid ipv4 or ipv6 targets were found
exit status 1

@Mzack9999 Mzack9999 self-assigned this Oct 9, 2023
@Mzack9999 Mzack9999 linked an issue Oct 9, 2023 that may be closed by this pull request
@Mzack9999 Mzack9999 marked this pull request as ready for review October 10, 2023 09:56
@Mzack9999 Mzack9999 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Oct 10, 2023
@tarunKoyalwar tarunKoyalwar self-requested a review October 10, 2023 10:54
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.

panic

$ echo www.scanme.sh | ./naabu -exclude-hosts scanme.sh -p 80 -v

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

		projectdiscovery.io

[INF] Current naabu version 2.1.8 (latest)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1017ec9dc]

goroutine 1 [running]:
github.com/projectdiscovery/dnsx/libs/dnsx.(*DNSX).QueryMultiple(0x16f0cf677?, {0x16f0cf677?, 0x14000c0db18?})
	/Users/tarun/go/pkg/mod/github.com/projectdiscovery/dnsx@v1.1.5/libs/dnsx/dnsx.go:130 +0x1c
github.com/projectdiscovery/naabu/v2/pkg/runner.(*Runner).host2ips(0x14000119800, {0x16f0cf677, 0x9})
	/Users/tarun/Codebase/naabu/v2/pkg/runner/util.go:17 +0x128
github.com/projectdiscovery/naabu/v2/pkg/runner.(*Runner).getExcludeItems(0x16f0cf677?, {0x16f0cf677, 0x9})
	/Users/tarun/Codebase/naabu/v2/pkg/runner/ips.go:44 +0x98
github.com/projectdiscovery/naabu/v2/pkg/runner.(*Runner).parseExcludedIps(0x140000d4d90?, 0x140005d8900)
	/Users/tarun/Codebase/naabu/v2/pkg/runner/ips.go:14 +0x104
github.com/projectdiscovery/naabu/v2/pkg/runner.NewRunner(0x140005d8900)
	/Users/tarun/Codebase/naabu/v2/pkg/runner/runner.go:74 +0xf0
main.main()
	/Users/tarun/Codebase/naabu/v2/cmd/naabu/main.go:15 +0x28

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 !

$  echo www.scanme.sh | ./naabu -exclude-hosts scanme.sh -p 80 -v

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

		projectdiscovery.io

[INF] Current naabu version 2.1.8 (latest)
[WRN] Skipping host www.scanme.sh as ip 128.199.158.128 was excluded
[INF] Running CONNECT scan with non root privileges
[FTL] Could not run enumeration: no valid ipv4 or ipv6 targets were found

@Mzack9999 Mzack9999 merged commit fd36cc1 into dev Oct 10, 2023
9 checks passed
@Mzack9999 Mzack9999 deleted the issue-821-exclude-hosts branch October 10, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

exclude-hosts flag only works with IP and CIDR
2 participants