Skip to content

Commit 11fb781

Browse files
authored
added details about helper script
1 parent 971c6e9 commit 11fb781

File tree

1 file changed

+48
-13
lines changed

1 file changed

+48
-13
lines changed

README.md

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Inspired by the great `furious` project of [@liamg](https://github.com/liamg).
2121
- [macOS](#macos)
2222
- [Windows](#windows)
2323
- [Running naabu](#running-naabu)
24+
- [Helper scripts](#helper-scripts)
25+
2426

2527
# Features
2628

@@ -54,7 +56,7 @@ This will display help for the tool. Here are all the switches it supports.
5456
| -Pn | Perform ping probe to detect alive hosts | naabu -Pn |
5557
| -o | File to write output to (optional) | naabu -o output.txt |
5658
| -oD | Directory to write enumeration results to (optional) | naabu -oD outputs |
57-
| -oJ | Write output in JSON lines Format | naabu -oJ -o output.json |
59+
| -json | Prints output in JSON lines Format | naabu -json |
5860
| -silent | Show only host:ports in output | naabu -silent |
5961
| -retries | Number of retries for the port scan probe (default 1) | naabu -retries 4 |
6062
| -rate | Rate of port scan probe requests (default 1000) | naabu -rate 100 |
@@ -84,9 +86,6 @@ naabu requires go1.13+ to install successfully. Run the following command to get
8486
GO111MODULE=on go get -v github.com/projectdiscovery/naabu/cmd/naabu
8587
```
8688

87-
You also need the following libraries installed for the `go get` to work - `libpcap, libpcap-dev`.
88-
89-
On Ubuntu linux `libpcap` is installed by default. For those compiling from source, the header files can be installed by using `apt-get install libpcap-dev`.
9089

9190
#### From Binary
9291

@@ -130,14 +129,12 @@ docker run -it projectdiscovery/naabu -host hackerone.com > hackerone.com.txt
130129

131130
### MacOS
132131

133-
On MacOS, the install instructions are similar to linux. You can download a binary for MacOS from the releases page. You can also `go get` the package to install it from source.
134-
135-
You need `libpcap` library on MacOS to build successfully from source or run the downloaded binary. If you are using homebrew as your package manager, you can run `brew install libpcap` to download and install it in your system.
132+
On MacOS, the install instructions are similar to linux. You can download a binary for MacOS from the releases page. You can also `go get` the package to install it from the source.
136133

137-
After that, you can just run the following command to download and install naabu -
134+
You can just run the following command to download and install naabu -
138135

139136
```bash
140-
go get -v github.com/projectdiscovery/naabu/cmd/naabu
137+
GO111MODULE=on go get -v github.com/projectdiscovery/naabu/cmd/naabu
141138
```
142139

143140
See the [From Docker](#from-docker) section for install instructions on MacOS with docker.
@@ -218,11 +215,10 @@ google.com
218215
output.txt
219216
```
220217

221-
You can also get output in json format using -oJ switch. This switch saves the output in the JSON lines format.
218+
You can also get output in json format using -json switch. This switch saves the output in the JSON lines format.
222219

223220
```bash
224-
> naabu -host hackerone.com -oJ -o output.json
225-
> cat output.json
221+
> naabu -host hackerone.com -json
226222

227223
{"host":"hackerone.com","port":8443}
228224
{"host":"hackerone.com","port":443}
@@ -243,6 +239,7 @@ The ports discovered can be piped to other tools too. For example, you can pipe
243239

244240
```
245241
> echo "hackerone.com" | naabu -silent | httprobe
242+
> echo "hackerone.com" | naabu -silent | httpx -silent
246243
247244
http://hackerone.com:8443
248245
http://hackerone.com:443
@@ -256,7 +253,45 @@ If you want a second layer validation of the ports found, you can instruct the t
256253
> naabu -host hackerone.com -verify
257254
```
258255

259-
The most optimal setting for `threads` is 10. Increasing it while processing hosts may lead to increased false positive rates. So it is recommended to keep it low.
256+
The most optimal setting for `threads` is 10. Increasing it while processing hosts may lead to increased false-positive rates. So it is recommended to keep it low.
257+
258+
# Helper scripts
259+
260+
We have included two [helper scripts](https://github.com/projectdiscovery/naabu/tree/master/scripts) for the [nmap](https://nmap.org) ❤️ which can be used to pipe results from `naabu` to detect services using `nmap`, make sure you have `nmap` installed on your system.
261+
262+
```bash
263+
264+
> echo hackerone.com | naabu -silent | bash naabu2nmap.sh
265+
266+
___ ___ ___ _/ / __ __
267+
/ _ \/ _ \/ _ \/ _ \/ // /
268+
/_//_/\_,_/\_,_/_.__/\_,_/ v1
269+
270+
projectdiscovery.io
271+
272+
[WRN] Use with caution. You are responsible for your actions
273+
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
274+
[INF] Using host hackerone.com for enumeration
275+
[INF] Starting scan on host hackerone.com (104.16.99.52)
276+
[INF] Found 4 ports on host hackerone.com (104.16.99.52)
277+
278+
Running nmap service scan on found results.
279+
Executing nmap -iL naabu_output_targets.txt -p 443,80,8080,8443 -sV
280+
281+
PORT STATE SERVICE VERSION
282+
80/tcp open http cloudflare
283+
443/tcp open ssl/https cloudflare
284+
8080/tcp open http-proxy cloudflare
285+
8443/tcp open ssl/https-alt cloudflare
286+
287+
```
288+
289+
Similarly `prepare4nmap.sh` will prepare command to execute for nmap, feel free to update or create new scripts based on your use-case, PR's are always welcome.
290+
291+
```bash
292+
293+
> echo hackerone.com | naabu -silent | bash prepare4nmap.sh
294+
```
260295

261296
# License
262297

0 commit comments

Comments
 (0)