We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee13195 commit 04a701dCopy full SHA for 04a701d
modules/exploits/multi/fileformat/office_word_macro.rb
@@ -265,6 +265,11 @@ def get_template_path
265
266
def exploit
267
template_path = get_template_path
268
+
269
+ unless File.extname(template_path).match(/\.docx$/i)
270
+ fail_with(Failure::BadConfig, 'Template is not a docx file.')
271
+ end
272
273
print_status("Using template: #{template_path}")
274
@docx = unpack_docx(template_path)
275
@@ -277,7 +282,6 @@ def exploit
277
282
print_status("Finalizing docm: #{datastore['FILENAME']}")
278
283
docm = pack_docm
279
284
file_create(docm)
280
- super
281
285
end
286
287
0 commit comments