From c30bc9cb696cd87dfe894e0640f3d41b231ee8fc Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Tue, 16 Nov 2010 20:17:03 +0000 Subject: [PATCH] check for exploit rank and disclosure date git-svn-id: file:///home/svn/framework3/trunk@11051 4d416f70-5f16-0410-b530-b9f4589650da --- tools/msftidy.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/msftidy.rb b/tools/msftidy.rb index 52d9766f85..0768aeb09e 100755 --- a/tools/msftidy.rb +++ b/tools/msftidy.rb @@ -65,18 +65,22 @@ def check_single_file(dparts, fparts, f_rel) # check criteria based on whole content - has_rank = false - bad_term = true - if content =~ /\< Msf::Exploit/ + if content =~ / \< Msf::Exploit/ + has_rank = false + has_dd = false + has_rank = true if content =~ /Rank =/ - else - has_rank = true + has_dd = true if content =~ /DisclosureDate/ + + show_missing(f, 'missing exploit ranking', has_rank) + show_missing(f, 'missing disclosure date', has_dd) end + + bad_term = true if content.gsub("\n", "") =~ /stack[[:space:]]+overflow/i bad_term = false end - show_missing(f, 'missing exploit ranking', has_rank) show_missing(f, 'contains "stack overflow"', bad_term)