Skip to content
Browse files

Merge the commandline options with the payload's datastore

Not sure why this wasn't happening before. Some output formats were
passing options to Msf::Simple::Payload#generate_simple, some weren't.
This probably fixes several latent bugs.

[FIXRM #7109]
  • Loading branch information...
1 parent 428a98c commit 926fd0c6e886d97fde7f923ff9a3a6973ce7b738 @egypt egypt committed with todb Jul 16, 2012
Showing with 3 additions and 0 deletions.
  1. +2 −0 msfpayload
  2. +1 −0 msfvenom
View
2 msfpayload
@@ -117,6 +117,8 @@ rest.each do |x|
options[k] = v.to_s
end
+payload.datastore.merge! options
+
if (cmd =~ /^(p|y|r|d|c|j|x|b|v|w)/)
fmt = 'perl' if (cmd =~ /^p/)
fmt = 'ruby' if (cmd =~ /^y/)
View
1 msfvenom
@@ -300,6 +300,7 @@ if opts[:payload]
::Msf::Serializer::ReadableText.dump_options(payload,' '))
exit
end
+ payload.datastore.merge! datastore
end
end

0 comments on commit 926fd0c

Please sign in to comment.
Something went wrong with that request. Please try again.