Skip to content

Commit

Permalink
Merge the commandline options with the payload's datastore
Browse files Browse the repository at this point in the history
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
egypt authored and todb committed Jul 16, 2012
1 parent 428a98c commit 926fd0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions msfpayload
Expand Up @@ -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/)
Expand Down
1 change: 1 addition & 0 deletions msfvenom
Expand Up @@ -300,6 +300,7 @@ if opts[:payload]
::Msf::Serializer::ReadableText.dump_options(payload,' '))
exit
end
payload.datastore.merge! datastore
end
end

Expand Down

0 comments on commit 926fd0c

Please sign in to comment.