Skip to content

Commit dc71771

Browse files
committed
Change some texts
Changes include: * Make invalid ranking an error, because it may affect module search in msfconsole, or the metasploit site. * Make invalid disclosure format an error, same concern as above. * Plus other changes
1 parent a5cdf5d commit dc71771

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/msftidy.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def check_ranking
8888

8989
if @source =~ /Rank \= (\w+)/
9090
if not available_ranks.include?($1)
91-
warn("Invalid ranking. You have '#{$1}'")
91+
error("Invalid ranking. You have '#{$1}'")
9292
end
9393
end
9494
end
@@ -108,9 +108,9 @@ def check_disclosure_date
108108
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
109109
]
110110

111-
warn('Incorrect disclosure month format') if months.index(m).nil?
111+
error('Incorrect disclosure month format') if months.index(m).nil?
112112
else
113-
warn('Incorrect disclosure date format')
113+
error('Incorrect disclosure date format')
114114
end
115115
end
116116
end
@@ -123,7 +123,7 @@ def check_title_format
123123
if word[0,1] =~ /[a-z]/ and word[1,1] !~ /[A-Z0-9]/
124124
next if word =~ /php[A-Z]/
125125
next if %w{iseemedia activePDF freeFTPd osCommerce myBB qdPM}.include? word
126-
warn("Bad capitalization in module title: #{word}")
126+
warn("Improper capitalization in module title: '#{word}...'")
127127
end
128128
end
129129
end
@@ -145,7 +145,7 @@ def check_function_basics
145145
functions.each do |func_name, args|
146146
# Check argument length
147147
args_length = args.split(",").length
148-
warn("Poorly designed argument list in '#{func_name}'. Try a hash.") if args_length > 6
148+
warn("Poorly designed argument list in '#{func_name}()'. Try a hash.") if args_length > 6
149149
end
150150
end
151151

0 commit comments

Comments
 (0)