From 023bde5b43a846a3e555b5dc8de1521907d81bd7 Mon Sep 17 00:00:00 2001 From: sinn3r Date: Mon, 7 Apr 2014 14:21:04 -0500 Subject: [PATCH] Correct msftidy disclosure date check This correct msftidy's disclosure date check to do the following: 1. If the module has a disclosure date, the check should kick in. 2. If the module is an exploit, and doesn't have a disclosure date, then it will be flagged. 3. If the module is an auxiliary, and doesn't have a disclosure date, then it will NOT be flgged (because not all aux modules target bugs/vulns like exploits do). --- tools/msftidy.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/msftidy.rb b/tools/msftidy.rb index 6144494ebf..7f65baae8c 100755 --- a/tools/msftidy.rb +++ b/tools/msftidy.rb @@ -324,7 +324,7 @@ class Msftidy end def check_disclosure_date - return if @source =~ /Generic Payload Handler/ or @source !~ / \< Msf::Exploit/ + return if @source =~ /Generic Payload Handler/ # Check disclosure date format if @source =~ /["']DisclosureDate["'].*\=\>[\x0d\x20]*['\"](.+)['\"]/ @@ -343,7 +343,7 @@ class Msftidy error('Incorrect disclosure date format') end else - error('Exploit is missing a disclosure date') + error('Exploit is missing a disclosure date') if @source =~ / \< Msf::Exploit/ end end