More strict on check_disclosure_date

This commit is contained in:
sinn3r 2012-10-14 19:06:36 -05:00
parent 97ac7fa184
commit a11d16ea30
1 changed files with 5 additions and 3 deletions

View File

@ -96,13 +96,13 @@ class Msftidy
end
def check_disclosure_date
return if @source =~ /Generic Payload Handler/
return if @source =~ /Generic Payload Handler/ or @source !~ / \< Msf::Exploit/
# Check disclosure date format
if @source =~ /'DisclosureDate' => ['|\"](.+)['|\"]/
if @source =~ /'DisclosureDate'.*\=\>[\x0d|\x20]*['|\"](.+)['|\"]/
d = $1 #Captured date
# Flag if overall format is wrong
if d =~ /^... \d{1,2} \d{4}/
if d =~ /^... \d{1,2}\,* \d{4}/
# Flag if month format is wrong
m = d.split[0]
months = [
@ -114,6 +114,8 @@ class Msftidy
else
error('Incorrect disclosure date format')
end
else
error('Exploit is missing a disclosure date')
end
end