Skip to content

Commit 701cde0

Browse files
committed
Init all payloads if not set when module is an exploit
1 parent 312c7f0 commit 701cde0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

msfcli

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@ class Msfcli
241241
# Cleanup empty args
242242
junk_args.each { |args| @args[:params].delete(args) }
243243

244+
# If it's an exploit and no payload set, load them all.
245+
if @args[:module_name] !~ /auxiliary\// and payload_param.empty?
246+
whitelist << /payloads\/.+/
247+
end
248+
244249
# Add post modules list if not set
245250
if post_val.nil?
246251
whitelist << /post\/.+/

0 commit comments

Comments
 (0)