File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
lib/msf/util/document_generator Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -204,10 +204,25 @@ def normalize_targets(targets)
204
204
# @param refs [Array] Module references.
205
205
# @return [String]
206
206
def normalize_references ( refs )
207
- refs . collect { |r | "* <a href=\" #{ r } \" >#{ r } </a>" } * "\n "
207
+ normalized = ''
208
+ refs . each do |ref |
209
+ case ref . ctx_id
210
+ when 'AKA'
211
+ normalized << "* *Also known as:* #{ ref . ctx_val } "
212
+ when 'MSB'
213
+ normalized << "* [#{ ref . ctx_val } ](#{ ref . site } )"
214
+ when 'URL'
215
+ normalized << "* [#{ ref . site } ](#{ ref . site } )"
216
+ when 'US-CERT-VU'
217
+ normalized << "* [VU##{ ref . ctx_val } ](#{ ref . site } )"
218
+ else
219
+ normalized << "* [#{ ref . ctx_id } -#{ ref . ctx_val } ](#{ ref . site } )"
220
+ end
221
+ normalized << "\n "
222
+ end
223
+ normalized
208
224
end
209
225
210
-
211
226
# Returns the markdown format for module platforms.
212
227
#
213
228
# @param platforms [Array, String] Module platforms.
You can’t perform that action at this time.
0 commit comments