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]
unstable
James Lee 2012-07-16 14:34:03 -06:00 committed by Tod Beardsley
parent 428a98c1d1
commit 926fd0c6e8
2 changed files with 3 additions and 0 deletions

View File

@ -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 File

@ -300,6 +300,7 @@ if opts[:payload]
::Msf::Serializer::ReadableText.dump_options(payload,' '))
exit
end
payload.datastore.merge! datastore
end
end