Land #6099, make_nops doesn't take into account all the compatible encoders
commit
b76192dbcb
|
@ -342,14 +342,18 @@ class EncodedPayload
|
|||
self.nop_sled = nop.generate_sled(self.nop_sled_size,
|
||||
'BadChars' => reqs['BadChars'],
|
||||
'SaveRegisters' => save_regs)
|
||||
|
||||
if nop_sled && nop_sled.length == nop_sled_size
|
||||
break
|
||||
else
|
||||
dlog("#{pinst.refname}: Nop generator #{nop.refname} failed to generate sled for payload", 'core', LEV_1)
|
||||
end
|
||||
rescue
|
||||
dlog("#{pinst.refname}: Nop generator #{nop.refname} failed to generate sled for payload: #{$!}",
|
||||
'core', LEV_1)
|
||||
|
||||
self.nop = nil
|
||||
end
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
if (self.nop_sled == nil)
|
||||
|
|
|
@ -1034,12 +1034,16 @@ class Exploit < Msf::Module
|
|||
nop_sled = nop.generate_sled(count,
|
||||
'BadChars' => payload_badchars || '',
|
||||
'SaveRegisters' => save_regs)
|
||||
|
||||
if nop_sled && nop_sled.length == count
|
||||
break
|
||||
else
|
||||
wlog("#{self.refname}: Nop generator #{nop.refname} failed to generate sled for exploit", 'core', LEV_0)
|
||||
end
|
||||
rescue
|
||||
wlog("#{self.refname}: Nop generator #{nop.refname} failed to generate sled for exploit: #{$!}",
|
||||
'core', LEV_0)
|
||||
end
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
nop_sled
|
||||
|
|
Loading…
Reference in New Issue