A report parser is a piece of code written in order to parse a report or a file. The files under discussion in this case are Nessus and Nmap files. The detailed description and functionality of each are covered in the following sections.
Report parsers
Nmap parser
Nmap produces outputs in various formats (text, CSV, and XML). In this section, we are going to learn how we can quickly and easily parse Nmap report files in XML format. There are two approaches we can use to do this:
- The first approach is to build a parser from scratch and employ the same concepts that we discussed in Chapter 4, Advanced Python Modules, which focused on XML parsing.
- The second and recommended approach is to avoid re-inventing the wheel. Always...