Land #3024 - Allow encoder Compat options

bug/bundler_fix
sinn3r 2014-03-13 10:59:40 -05:00
commit 7ead04414c
No known key found for this signature in database
GPG Key ID: 2384DB4EF06F730B
2 changed files with 12 additions and 0 deletions

View File

@ -125,6 +125,17 @@ class EncodedPayload
self.encoder = encmod.new
self.encoded = nil
# If the encoding is requested by an exploit check compatibility
# options first of all. For the 'generic/none' encoder compatibility
# options don't apply.
if (reqs['Exploit'] &&
!reqs['Exploit'].compatible?(self.encoder) &&
encname !~ /generic\/none/)
wlog("#{pinst.refname}: Encoder #{encoder.refname} doesn't match the exploit Compat options",
'core', LEV_1)
next
end
# If there is an encoder type restriction, check to see if this
# encoder matches with what we're searching for.
if ((reqs['EncoderType']) and

View File

@ -532,6 +532,7 @@ class Exploit < Msf::Module
reqs['EncoderType'] = payload_encoder_type(explicit_target)
reqs['EncoderOptions'] = payload_encoder_options(explicit_target)
reqs['ExtendedOptions'] = payload_extended_options(explicit_target)
reqs['Exploit'] = self
# Pass along the encoder don't fall through flag
reqs['EncoderDontFallThrough'] = datastore['EncoderDontFallThrough']