Twigonometry / dotfiles

Cybersecurity based dotfiles
0 stars 0 forks source link

Extract open ports after nfast #5

Open Twigonometry opened 1 year ago

Twigonometry commented 1 year ago

After nfast() is executed, extract the open ports from the output files and then output a suggested command to scan them with scripts that can be copy-pasted into terminal. E.g.

nfast 10.10.10.10

...

PORT     STATE SERVICE                                 
22/tcp   open  ssh
80/tcp   open  http
8080/tcp open  http-proxy

[INFO] Now run nmap -sC -sV -p 22,80,8080 10.10.10.10 -oA nmap/10.10.10.10
Twigonometry commented 1 year ago

Should be easy with something like grep "open" nmap/10.10.10.10-allports.nmap | awk -F '/' '{print $1}' and then combine them into one comma-separated line