From 34d8684840b94754a2244d56632c27f03565839e Mon Sep 17 00:00:00 2001 From: Hyperling Date: Wed, 3 Feb 2021 21:39:24 -0600 Subject: [PATCH] Remove junk from nmap results. --- tasks/general/tests/nmap.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tasks/general/tests/nmap.yml b/tasks/general/tests/nmap.yml index 8d7a29f..35438f7 100644 --- a/tasks/general/tests/nmap.yml +++ b/tasks/general/tests/nmap.yml @@ -1,10 +1,13 @@ --- # Nmap port test -- name: General | Tests | nmap | Run - shell: "nmap localhost > /root/nmap.txt" +- name: General | Tests | nmap | Run Count + shell: "nmap --open localhost | grep -c open > /root/nmap.txt" -- name: General | Tests | nmap | Make Report Readable +- name: General | Tests | nmap | Run Open + shell: "nmap --open localhost | grep open >> /root/nmap.txt" + +- name: General | Tests | nmap | Make Viewable file: path: "/root/nmap.txt" mode: '0444' \ No newline at end of file