Skip to content

Commit 023bde5

Browse files
committed
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).
1 parent 579d6c7 commit 023bde5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/msftidy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def check_ranking
324324
end
325325

326326
def check_disclosure_date
327-
return if @source =~ /Generic Payload Handler/ or @source !~ / \< Msf::Exploit/
327+
return if @source =~ /Generic Payload Handler/
328328

329329
# Check disclosure date format
330330
if @source =~ /["']DisclosureDate["'].*\=\>[\x0d\x20]*['\"](.+)['\"]/
@@ -343,7 +343,7 @@ def check_disclosure_date
343343
error('Incorrect disclosure date format')
344344
end
345345
else
346-
error('Exploit is missing a disclosure date')
346+
error('Exploit is missing a disclosure date') if @source =~ / \< Msf::Exploit/
347347
end
348348
end
349349

0 commit comments

Comments
 (0)