rapid7/metasploit-framework — pull request #932 by wchen-r7 (2012-10-19 17:43:56+00:00)
Title: Add prepend_migrate? to retreive the status of PrependMigrate

After discussing with egypt and Tod for the 3rd time about pull request 917 ("Add migrate stub option to Windows x86 payloads"), this is the approach we've decided to take:

'DefaultOptions' => { 'PrependMigrate' => true },

And then in exploit():

if !prepend_migrate?
print_error("PrependMigrate should not be turned off")
return
end

deregister_options() is no longer recommended, because if we use that, datastore['PrependMigrate'] will always be false.