Fix target DisableNops not being passed to payload
parent
d25aad571f
commit
e2428b5c20
|
@ -557,6 +557,7 @@ class Exploit < Msf::Module
|
||||||
reqs['BadChars'] = payload_badchars(explicit_target)
|
reqs['BadChars'] = payload_badchars(explicit_target)
|
||||||
reqs['Append'] = payload_append(explicit_target)
|
reqs['Append'] = payload_append(explicit_target)
|
||||||
reqs['AppendEncoder'] = payload_append_encoder(explicit_target)
|
reqs['AppendEncoder'] = payload_append_encoder(explicit_target)
|
||||||
|
reqs['DisableNops'] = payload_disable_nops(explicit_target)
|
||||||
reqs['MaxNops'] = payload_max_nops(explicit_target)
|
reqs['MaxNops'] = payload_max_nops(explicit_target)
|
||||||
reqs['MinNops'] = payload_min_nops(explicit_target)
|
reqs['MinNops'] = payload_min_nops(explicit_target)
|
||||||
reqs['Encoder'] = datastore['ENCODER'] || payload_encoder(explicit_target)
|
reqs['Encoder'] = datastore['ENCODER'] || payload_encoder(explicit_target)
|
||||||
|
@ -879,6 +880,19 @@ class Exploit < Msf::Module
|
||||||
p
|
p
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# Whether NOP generation should be enabled or disabled
|
||||||
|
#
|
||||||
|
def payload_disable_nops(explicit_target = nil)
|
||||||
|
explicit_target ||= target
|
||||||
|
|
||||||
|
if (explicit_target and explicit_target.payload_disable_nops)
|
||||||
|
explicit_target.payload_disable_nops
|
||||||
|
else
|
||||||
|
payload_info['DisableNops']
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Maximum number of nops to use as a hint to the framework.
|
# Maximum number of nops to use as a hint to the framework.
|
||||||
# Nil signifies that the framework should decide.
|
# Nil signifies that the framework should decide.
|
||||||
|
|
|
@ -219,6 +219,13 @@ class Msf::Module::Target
|
||||||
opts['Payload'] ? opts['Payload']['StackAdjustment'] : nil
|
opts['Payload'] ? opts['Payload']['StackAdjustment'] : nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# Whether NOP generation should be enabled or disabled
|
||||||
|
#
|
||||||
|
def payload_disable_nops
|
||||||
|
opts['Payload'] ? opts['Payload']['DisableNops'] : nil
|
||||||
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Payload max nops information for this target.
|
# Payload max nops information for this target.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue