Parsing Output
grep and cut.
Turning Noise into Data
Tools produce walls of text. The skill that makes a recon script useful is parsing - extracting just the IPs, ports, or hostnames you care about.
This lesson focuses on grep and cut, with sort and uniq for cleanup.
Filtering with grep
Start by keeping only the relevant lines. To pull open ports from Nmap output, grep for the word open.
grep 'open' services.txtAll lessons in this course
- Script Basics
- Automating Recon
- Parsing Output
- Building a Recon Tool