1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00

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]
This commit is contained in:
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 options[k] = v.to_s
end end
payload.datastore.merge! options
if (cmd =~ /^(p|y|r|d|c|j|x|b|v|w)/) if (cmd =~ /^(p|y|r|d|c|j|x|b|v|w)/)
fmt = 'perl' if (cmd =~ /^p/) fmt = 'perl' if (cmd =~ /^p/)
fmt = 'ruby' if (cmd =~ /^y/) fmt = 'ruby' if (cmd =~ /^y/)

View File

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