Skip to content

[Bug] -nmap-cli fails when used combined with custom ports #126

@dogasantos

Description

@dogasantos

Describe the bug
When using -nmap-cli option, the -p switch only works for full tcp "-p -". If you specify any port, it will fail.

naabu will throw an error related with interface:

[ERR] Could not get network interfaces: exit status 1
However, provide the interface via -interface has no effect.
Also, using -p through the nmap-cli won't work.

Using strace, we can see that naabu tries to execute nmap with a blank -p parameter:

[pid 187478] execve("/usr/bin/nmap", ["nmap", "-sV", "-p", "443", "-oX", "naabu-output.xml", "-p", ""], 0xc0007a4000 /* 33 vars */ <unfinished ...>

To Reproduce
naabu -iL ips.txt -nmap -p 80 -scan-all-ips -stats -nmap-cli 'nmap -sV -oX naabu-output.xml'

Screenshots
naabu-working

naabu-not-working-1

naabu-not-working-2

Metadata

Metadata

Assignees

Labels

Status: CompletedNothing further to be done with this issue. Awaiting to be closed.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions