Comments (4)
Looks like this is actually related to: projectdiscovery/goflags#118 so we can probably close this one out. Thanks to pdteam in discord for pointing it out to me.
from naabu.
One minor correction to the above. The command I used to replicate included the option '-j' and applied an argument to that option of 'file.json'
sudo /home/jon/.pdtm/go/bin/naabu -l ips.lst -retries 1 -timeout 500 -o ips.naabu.scn -j file.json -Pn
from naabu.
I was unable to reproduce the issue using the provided steps and the outcome was the same:
run naabu -l ips.lst -retries 1 -timeout 500 -o fileout -Pn
run naabu -Pn -l ips.lst -retries 1 -timeout 500 -o fileout
Same with the following:
sudo /home/jon/.pdtm/go/bin/naabu -l ips.lst -retries 1 -timeout 500 -o ips.naabu.scn -j file.json -Pn
Also, -j, -json write output in JSON lines format
is a boolean flag. Therefore, the output will be written in -o ips.naabu.scn
in your case. Additionally,
without providing an arg to -j
$ echo scanme.sh | sudo ./naabu -p 80 -j -Pn
__
___ ___ ___ _/ / __ __
/ _ \/ _ \/ _ \/ _ \/ // /
/_//_/\_,_/\_,_/_.__/\_,_/
projectdiscovery.io
[INF] Current naabu version 2.2.0 (latest)
[INF] Running SYN scan with CAP_NET_RAW privileges
[INF] Found 1 ports on host scanme.sh (128.199.158.128)
{"host":"scanme.sh","ip":"128.199.158.128","timestamp":"2023-12-05T10:41:53.103596134Z","port":80,"protocol":"tcp","tls":false}
with providing an arg to -j
$ echo scanme.sh | sudo ./naabu -p 80 -j aa -Pn
__
___ ___ ___ _/ / __ __
/ _ \/ _ \/ _ \/ _ \/ // /
/_//_/\_,_/\_,_/_.__/\_,_/
projectdiscovery.io
[INF] Current naabu version 2.2.0 (latest)
Starting host discovery
[INF] Running host discovery scan
[INF] Running SYN scan with CAP_NET_RAW privileges
[INF] Found 1 ports on host scanme.sh (128.199.158.128)
{"host":"scanme.sh","ip":"128.199.158.128","timestamp":"2023-12-05T10:43:01.807686764Z","port":80,"protocol":"tcp","tls":false}
from naabu.
I do realize (after the fact) that the -j option doesnt function like nmap where you can have multiple output files in different formats. That said, I would expect the command to fail as improper. It does not. So I am wondering what naabu thinks that argument is.
Additional details, I can replicate this on two different VMs one is a Kali VM and the other is a VM with a fresh install of Kali via iso.
sudo /home/kali/.pdtm/go/bin/naabu -host 192.168.100.1 -retries 1 -timeout 500 -o file1 -j file.json -Pn
sudo /home/kali/.pdtm/go/bin/naabu -host 192.168.100.1 -retries 1 -timeout 500 -o file1 -j -Pn
Here is a cli with a junk argument thrown in that seems to cause naabu to stop parsing the command line and just run. Notice that the output is not in json format and that host discovery is run, both of these options come after the "junkarg" argument.
sudo /home/kali/.pdtm/go/bin/naabu -host 192.168.100.64 -retries 1 -timeout 500 -o file1 junkarg -j -Pn
from naabu.
Related Issues (20)
- [FR] OnNoResult callback HOT 4
- installing issue HOT 1
- panic: could not determine route type HOT 1
- UDP Open Ports Not Displayed in naabu Scan HOT 1
- FreeBSD scan_common.go:62:23: undefined: routing.New
- Can't silent command / output naabu HOT 1
- When using naabu as a library, an error occurs: no free handlers
- Request, timeout & no valid ipv4 or ipv6 targets were found HOT 5
- OnResult not be invoked when threshold reached
- Port spray support HOT 2
- v2.3.0 gives internal nil pointer on "phase.RLock()" but 2.2.1 does work. HOT 10
- github.com/google/gopacket/pcap Erro installation HOT 2
- Naabu on macos is looping to scan some IP addresses.Only the first 7 or 8 can scans can be successful. HOT 3
- Silent doesn't work. Naabu (as a library) is too verbose. HOT 1
- Increase library callback functionality to have parity with fields available in output. HOT 2
- Unrecognized import path "aead.dev/minisign HOT 1
- Build fails on OpenBSD: pkg/privileges/privileges.go:6:17: undefined: isPrivileged HOT 1
- follow up issue for refactor HOT 2
- -source-ip is ignored HOT 2
- -exclude-ports Flag Fails to Function Correctly When Used Alongside -passive Flag HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naabu.