From 28d35a5bf47886a258c0ddc6d7e72407dff8916e Mon Sep 17 00:00:00 2001 From: wchen-r7 Date: Fri, 29 May 2015 18:03:56 -0500 Subject: [PATCH] Update doc --- lib/msf/core/exploit/browserautopwnv2.rb | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/msf/core/exploit/browserautopwnv2.rb b/lib/msf/core/exploit/browserautopwnv2.rb index 59eff4ecd9..df0fc0c2a8 100644 --- a/lib/msf/core/exploit/browserautopwnv2.rb +++ b/lib/msf/core/exploit/browserautopwnv2.rb @@ -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'