Update doc

bug/bundler_fix
wchen-r7 2015-05-29 18:03:56 -05:00
parent e83677d29d
commit 28d35a5bf4
1 changed files with 21 additions and 3 deletions

View File

@ -299,7 +299,7 @@ module Msf
# Returns the selected payload's LPORT.
#
# @param [String] platform
# @param [Symbol] platform
# @return [Fixnum]
def get_selected_payload_lport(platform)
datastore["PAYLOAD_#{platform.to_s.upcase}_LPORT"]
@ -373,6 +373,13 @@ module Msf
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)
begin
platform_obj = Msf::Module::Platform.find_platform(payload_platform.to_s)
@ -386,6 +393,13 @@ module Msf
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)
m.compatible_payloads.each do |k|
return true if k[0] == payload_name
@ -395,13 +409,17 @@ module Msf
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)
m.fullname.include?('multi/')
end
# Returns the selected payload. This method will choose a compatible payload based on the
# default list.
# Returns an appropriate payload that's compatible with the module.
#
# @param [Object] m A module that's been initialized.
# @return [String] Payload name. Example: 'windows/meterpreter/reverse_tcp'