rapid7/metasploit-framework — pull request #1288 by wchen-r7 (2013-01-10 23:28:16+00:00)
Title: Fixes 2 issues: Forgotten datastore options, and invalid BufferRegister

The 1st bug is msfvenom forgot to import datastore options to encoders, which may cause a backtrace depending on which encoder you're using. We caught this bug using cucumber, so all you gotta do is run the encoders.feature test case, and then you will reproduce the bug:

cucumber test/features/encoders.feature

Or, if you don't have cucumber setup, you can just run this to reproduce it -- same thing:

msfvenom -p windows/shell/bind_tcp -e x86/unicode_mixed -i 1 BufferRegister=eax

Reported on redmine here:
http://dev.metasploit.com/redmine/issues/7681

The 2nd bug is the unicode_mixed payload does not handle the BufferRegister's casing properly. So if you supply BufferRegister=eax, it won't understand what that register is. Instead, you must do BufferRegister=EAX, which is annoying. The fix also checks if BufferRegister is a valid register or not.

Also reported on redmine here:
http://dev.metasploit.com/redmine/issues/7684