rapid7/metasploit-framework — pull request #4346 by zeroSteiner (2014-12-09 21:58:46+00:00)
Title: Msfvenom should pass the datastore to encoders too

Currently it looks like datastore options are not set for encoders when used by msfvenom. This leads to invalid shellcode being created when an option for the encoder is specified.

For example generating alpha numeric shellcode often requires specifying a value for BufferRegister like this:
```./msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.90.1 LPORT=4444 -a x86 -t raw -a x86 -e x86/alpha_mixed BufferRegister=EAX```

Testing:
- [ ] Generate alphanumeric shellcode, relying on an encoder option being set correctly with msfvenom
- [ ] Ensure that the encoder received the option and the result is valid