Skip to content

Commit 6c36a82

Browse files
committed
Land rapid7#5059, @void-in's documentation clean up
2 parents 828301a + fe5ddc0 commit 6c36a82

File tree

144 files changed

+507
-629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+507
-629
lines changed

lib/metasploit/framework/credential_collection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def initialize(opts = {})
7979
# Adds a string as an addition private credential
8080
# to be combined in the collection.
8181
#
82-
# @param [String] :private_str the string to use as a private
82+
# @param [String] private_str the string to use as a private
8383
# @return [void]
8484
def add_private(private_str='')
8585
additional_privates << private_str
@@ -88,7 +88,7 @@ def add_private(private_str='')
8888
# Adds a string as an addition public credential
8989
# to be combined in the collection.
9090
#
91-
# @param [String] :public_str the string to use as a public
91+
# @param [String] public_str the string to use as a public
9292
# @return [void]
9393
def add_public(public_str='')
9494
additional_publics << public_str

lib/metasploit/framework/login_scanner/http.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@ def check_setup
189189

190190
# Sends a HTTP request with Rex
191191
#
192-
# @param [Hash] Native support includes the following (also see Rex::Proto::Http::Request#request_cgi)
193-
# @option opts[String] 'host' The remote host
194-
# @option opts[Fixnum] 'port' The remote port
195-
# @option opts[Boolean] 'ssl' The SSL setting, TrueClass or FalseClass
196-
# @option opts[String] 'proxies' The proxies setting
197-
# @option opts[Credential] 'credential' A credential object
198-
# @option opts['Hash'] 'context' A context
192+
# @param [Hash] opts native support includes the following (also see Rex::Proto::Http::Request#request_cgi)
193+
# @option opts [String] 'host' The remote host
194+
# @option opts [Fixnum] 'port' The remote port
195+
# @option opts [Boolean] 'ssl' The SSL setting, TrueClass or FalseClass
196+
# @option opts [String] 'proxies' The proxies setting
197+
# @option opts [Credential] 'credential' A credential object
198+
# @option opts ['Hash'] 'context' A context
199199
# @raise [Rex::ConnectionError] One of these errors has occured: EOFError, Errno::ETIMEDOUT, Rex::ConnectionError, ::Timeout::Error
200200
# @return [Rex::Proto::Http::Response] The HTTP response
201201
# @return [NilClass] An error has occured while reading the response (see #Rex::Proto::Http::Client#read_response)
@@ -356,7 +356,7 @@ def set_sane_defaults
356356

357357
# Combine the base URI with the target URI in a sane fashion
358358
#
359-
# @param [String] The target URL
359+
# @param [String] target_uri the target URL
360360
# @return [String] the final URL mapped against the base
361361
def normalize_uri(target_uri)
362362
(self.uri.to_s + "/" + target_uri.to_s).gsub(/\/+/, '/')

lib/metasploit/framework/login_scanner/symantec_web_gateway.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def check_setup
2929

3030
# Returns the latest sid from Symantec Web Gateway.
3131
#
32-
# @returns [String] The PHP Session ID for Symantec Web Gateway login
32+
# @return [String] The PHP Session ID for Symantec Web Gateway login
3333
def get_last_sid
3434
@last_sid ||= lambda {
3535
# We don't have a session ID. Well, let's grab one right quick from the login page.

lib/msf/core/auxiliary/auth_brute.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ def prepend_db_hashes(cred_collection)
108108
# This method takes a {Metasploit::Framework::CredentialCollection} and prepends existing SSHKeys
109109
# from the database. This allows the users to use the DB_ALL_CREDS option.
110110
#
111-
# @param cred_collection [Metasploit::Framework::CredentialCollection]
111+
# @param [Metasploit::Framework::CredentialCollection] cred_collection
112112
# the credential collection to add to
113-
# @return [Metasploit::Framework::CredentialCollection] the modified Credentialcollection
113+
# @return [Metasploit::Framework::CredentialCollection] cred_collection the modified Credentialcollection
114114
def prepend_db_keys(cred_collection)
115115
if prepend_db_creds?
116116
each_ssh_cred do |cred|
@@ -140,8 +140,8 @@ def prepend_db_passwords(cred_collection)
140140
# {Metasploit::Framework::CredentialCollection} as dictated by the
141141
# selected datastore options.
142142
#
143-
# @param [Metasploit::Framework::CredentialCollection] the credential collection to add to
144-
# @param [Metasploit::Credential::Core] the Credential Core to process
143+
# @param [Metasploit::Framework::CredentialCollection] cred_collection the credential collection to add to
144+
# @param [Metasploit::Credential::Core] cred the credential to process
145145
def process_cred_for_collection(cred_collection, cred)
146146
msf_cred = cred.to_credential
147147
cred_collection.prepend_cred(msf_cred) if datastore['DB_ALL_CREDS']

lib/msf/core/auxiliary/jtr.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def new_john_cracker
7777
end
7878

7979
# This method instantiates a {Metasploit::Framework::JtR::Wordlist}, writes the data
80-
# out to a file and returns the {rex::quickfile} object.
80+
# out to a file and returns the {Rex::Quickfile} object.
8181
#
8282
# @return [nilClass] if there is no active framework db connection
8383
# @return [Rex::Quickfile] if it successfully wrote the wordlist to a file

lib/msf/core/auxiliary/report.rb

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,11 @@ def get_host(opts)
113113

114114
#
115115
# Report a client connection
116-
#
117-
# opts must contain
118-
# :host the address of the client connecting
119-
# :ua_string a string that uniquely identifies this client
120-
# opts can contain
121-
# :ua_name a brief identifier for the client, e.g. "Firefox"
122-
# :ua_ver the version number of the client, e.g. "3.0.11"
116+
# @param opts [Hash] report client information based on user-agent
117+
# @option opts [String] :host the address of the client connecting
118+
# @option opts [String] :ua_string a string that uniquely identifies this client
119+
# @option opts [String] :ua_name a brief identifier for the client, e.g. "Firefox"
120+
# @option opts [String] :ua_ver the version number of the client, e.g. "3.0.11"
123121
#
124122
def report_client(opts={})
125123
return if not db
@@ -161,7 +159,7 @@ def report_note(opts={})
161159
# by a module. This method is deprecated and the new Metasploit::Credential methods
162160
# should be used directly instead.
163161
#
164-
# @param :opts [Hash] the option hash
162+
# @param opts [Hash] the option hash
165163
# @option opts [String] :host the address of the host (also takes a {Mdm::Host})
166164
# @option opts [Fixnum] :port the port of the connected service
167165
# @option opts [Mdm::Service] :service an optional Service object to build the cred for

lib/msf/core/exploit/smb/client/psexec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def initialize(info = {})
3535
# Retrieve the SERVICE_NAME option, generate a random
3636
# one if not already set.
3737
#
38-
# @return service_name [String] the name of the service.
38+
# @return [String] service_name the name of the service.
3939
def service_name
4040
@service_name ||= datastore['SERVICE_NAME']
4141
@service_name ||= Rex::Text.rand_text_alpha(8)
@@ -44,15 +44,15 @@ def service_name
4444
# Retrieve the SERVICE_DISPLAY_NAME option, generate a random
4545
# one if not already set.
4646
#
47-
# @return service_display_name [String] the display name of the service.
47+
# @return [String] the display name of the service.
4848
def display_name
4949
@display_name ||= datastore['SERVICE_DISPLAY_NAME']
5050
@display_name ||= Rex::Text.rand_text_alpha(16)
5151
end
5252

5353
# Retrieve the SERVICE_DESCRIPTION option
5454
#
55-
# @return service_description [String] the service description.
55+
# @return [String] the service description.
5656
def service_description
5757
@service_description ||= datastore['SERVICE_DESCRIPTION']
5858
end

lib/msf/core/post/windows/mssql.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ def check_for_sqlserver(instance = nil)
5454
end
5555

5656
# Identifies a valid SQL Server command line client on the host and sets
57-
# @sql_client
57+
# sql_client
5858
#
59-
# @see #sql_client
59+
# @see sql_client
6060
# @return [String, nil] the SQL command line client
6161
def get_sql_client
6262
client = nil

lib/msf/core/post/windows/services.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ def service_restart(name, start_type=START_TYPE_AUTO, server=nil)
528528
# Parses out a SERVICE_STATUS struct from the
529529
# lpServiceStatus out parameter
530530
#
531-
# @param (lpServiceStatus)
531+
# @param lpServiceStatus [String] the latest status of calling service
532532
#
533533
# @return [Hash] Containing SERVICE_STATUS values
534534
#

lib/msf/http/jboss/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def http_verb
4949

5050
# Try to auto detect the target architecture and platform
5151
#
52-
# @param [Array] The available targets
52+
# @param [Array] available_targets The available targets
5353
# @return [Msf::Module::Target, nil] The detected target or nil
5454
def auto_target(available_targets)
5555
if http_verb == 'HEAD'

0 commit comments

Comments
 (0)