Update doc
parent
e83677d29d
commit
28d35a5bf4
|
@ -299,7 +299,7 @@ module Msf
|
||||||
|
|
||||||
# Returns the selected payload's LPORT.
|
# Returns the selected payload's LPORT.
|
||||||
#
|
#
|
||||||
# @param [String] platform
|
# @param [Symbol] platform
|
||||||
# @return [Fixnum]
|
# @return [Fixnum]
|
||||||
def get_selected_payload_lport(platform)
|
def get_selected_payload_lport(platform)
|
||||||
datastore["PAYLOAD_#{platform.to_s.upcase}_LPORT"]
|
datastore["PAYLOAD_#{platform.to_s.upcase}_LPORT"]
|
||||||
|
@ -373,6 +373,13 @@ module Msf
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Checks whether the payload is compatible with the module based on platform information.
|
||||||
|
# Best for single-platform modules and for performance.
|
||||||
|
#
|
||||||
|
# @param [Object] m Module.
|
||||||
|
# @param [Symbol] payload_platform Payload platform.
|
||||||
|
# @return [TrueClass] Payload is compatible.
|
||||||
|
# @return [FalseClass] Payload is not compatible.
|
||||||
def is_payload_platform_compatible?(m, payload_platform)
|
def is_payload_platform_compatible?(m, payload_platform)
|
||||||
begin
|
begin
|
||||||
platform_obj = Msf::Module::Platform.find_platform(payload_platform.to_s)
|
platform_obj = Msf::Module::Platform.find_platform(payload_platform.to_s)
|
||||||
|
@ -386,6 +393,13 @@ module Msf
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Checks whether the payload is compatible with the module based on the module's compatibility list.
|
||||||
|
# Best for multi-platform modules. This is much slower than #is_payload_platform_compatible?
|
||||||
|
#
|
||||||
|
# @param [Object] m Module.
|
||||||
|
# @param [String] payload_name
|
||||||
|
# @return [TrueClass] Payload is compatible.
|
||||||
|
# @return [FalseClass] Payload is not compatible.
|
||||||
def is_payload_compatible?(m, payload_name)
|
def is_payload_compatible?(m, payload_name)
|
||||||
m.compatible_payloads.each do |k|
|
m.compatible_payloads.each do |k|
|
||||||
return true if k[0] == payload_name
|
return true if k[0] == payload_name
|
||||||
|
@ -395,13 +409,17 @@ module Msf
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Checks if the module is multi-platform based on the directory path.
|
||||||
|
#
|
||||||
|
# @param [Object] m Module.
|
||||||
|
# @return [TrueClass] Module is multi-platform.
|
||||||
|
# @return [FalseClass] Module is not multi-platform.
|
||||||
def is_multi_platform_exploit?(m)
|
def is_multi_platform_exploit?(m)
|
||||||
m.fullname.include?('multi/')
|
m.fullname.include?('multi/')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Returns the selected payload. This method will choose a compatible payload based on the
|
# Returns an appropriate payload that's compatible with the module.
|
||||||
# default list.
|
|
||||||
#
|
#
|
||||||
# @param [Object] m A module that's been initialized.
|
# @param [Object] m A module that's been initialized.
|
||||||
# @return [String] Payload name. Example: 'windows/meterpreter/reverse_tcp'
|
# @return [String] Payload name. Example: 'windows/meterpreter/reverse_tcp'
|
||||||
|
|
Loading…
Reference in New Issue