From 926fd0c6e886d97fde7f923ff9a3a6973ce7b738 Mon Sep 17 00:00:00 2001 From: James Lee Date: Mon, 16 Jul 2012 14:34:03 -0600 Subject: [PATCH] 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] --- msfpayload | 2 ++ msfvenom | 1 + 2 files changed, 3 insertions(+) diff --git a/msfpayload b/msfpayload index e6bef308b5..a3b498279a 100755 --- a/msfpayload +++ b/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/) diff --git a/msfvenom b/msfvenom index 7684938b86..36946c7d1b 100755 --- a/msfvenom +++ b/msfvenom @@ -300,6 +300,7 @@ if opts[:payload] ::Msf::Serializer::ReadableText.dump_options(payload,' ')) exit end + payload.datastore.merge! datastore end end