Diffing results
In this section, we are going to learn how to integrate the Python script that's in charge of diffing between two PingCastle reports (day -1/d-day). This script is the same one that we used in Chapter 12, PTX – Purple Teaming eXtended.
The Python script takes two files as input:
- The report that was created day -1. This report can be found automatically using Ansible and the shell module by using the following command:
find "${option.path}" -mmin +60 -mmin -1440 -type f -name "*.xml"
Let's look at this command in more details:
mmin +60
: More than 1 hourmmin -1440
: Less than 24 hoursname "*.xml"
: All files with XML extensions
- The current report that we created (the last one). The correct report will be identified every day by Ansible.
Source: https://docs.ansible.com/ansible/2.5/modules/find_module.html.
In this section, we will use the following Ansible playbook...