Formating nmap output

1074 views grep
9

I have an nmap output looking like this

Nmap scan report for 10.90.108.82
Host is up (0.16s latency).

PORT   STATE SERVICE
80/tcp open  http
|_http-title: Did not follow redirect to https://10.90.108.82/view/login.html

I would like the output to be like

10.90.108.82 http-title: Did not follow redirect to https://10.90.108.82/view/login.html

How can it be done using grep or any other means ?

answered question

1 Answer

1

How about sed?

sed -n '/Did not follow/s/.*\/\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1 &/p'

posted this

Have an answer?

JD

Please login first before posting an answer.

Ads

Categories