More strict on check_disclosure_date
parent
97ac7fa184
commit
a11d16ea30
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue