Skip to content

Commit 4ba7619

Browse files
committed
Correct YARD doc comments
1 parent cecc8ab commit 4ba7619

File tree

22 files changed

+34
-39
lines changed

22 files changed

+34
-39
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/database.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module Database
2222
#
2323
# @param options [Hash{Symbol=>String}]
2424
# @option options [String] :path Path to use instead of first element of {configurations_pathnames}
25-
# @return [Pathname] if configuration pathname exists.
25+
# @return [String] pathname if configuration pathname exists.
2626
# @return [nil] if configuration pathname does not exist.
2727
def self.configurations_pathname(options={})
2828
options.assert_valid_keys(:path)

lib/metasploit/framework/login_scanner/http.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ 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)
192+
# @param [Hash] opts native support includes the following (also see Rex::Proto::Http::Request#request_cgi)
193193
# @option opts[String] 'host' The remote host
194194
# @option opts[Fixnum] 'port' The remote port
195195
# @option opts[Boolean] 'ssl' The SSL setting, TrueClass or FalseClass
@@ -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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def myworkspace
6161
# This method safely get the workspace ID. It handles if the db is not active
6262
#
6363
# @return [NilClass] if there is no DB connection
64-
# @return [Fixnum] the ID of the current {Mdm::Workspace}
64+
# @return [Fixnum] the ID of the current {::Mdm::Workspace}
6565
def myworkspace_id
6666
if framework.db.active
6767
myworkspace.id
@@ -115,7 +115,7 @@ def get_host(opts)
115115
# Report a client connection
116116
#
117117
# opts must contain
118-
# :host the address of the client connecting
118+
# :host the address of the client connecting
119119
# :ua_string a string that uniquely identifies this client
120120
# opts can contain
121121
# :ua_name a brief identifier for the client, e.g. "Firefox"
@@ -161,7 +161,7 @@ def report_note(opts={})
161161
# by a module. This method is deprecated and the new Metasploit::Credential methods
162162
# should be used directly instead.
163163
#
164-
# @param :opts [Hash] the option hash
164+
# @param opts [Hash] the option hash
165165
# @option opts [String] :host the address of the host (also takes a {Mdm::Host})
166166
# @option opts [Fixnum] :port the port of the connected service
167167
# @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] service_display_name 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] service_description the service description.
5656
def service_description
5757
@service_description ||= datastore['SERVICE_DESCRIPTION']
5858
end

lib/msf/core/exploit/tcp_server.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def initialize(info = {})
2222
# OptEnum.new('SSLVersion', [ false, 'Specify the version of SSL that should be used', 'TLS1', ['SSL2', 'SSL3', 'TLS1']]),
2323
OptPath.new('SSLCert', [ false, 'Path to a custom SSL certificate (default is randomly generated)']),
2424
OptAddress.new('SRVHOST', [ true, "The local host to listen on. This must be an address on the local machine or 0.0.0.0", '0.0.0.0' ]),
25+
#OptAddress.new('SRVHOST', [ true, "The local host to listen on. This must be an address on the local machine or 0.0.0.0", "#{Rex::Socket.source_address}" ]),
2526
OptPort.new('SRVPORT', [ true, "The local port to listen on.", 8080 ]),
2627

2728
], Msf::Exploit::Remote::TcpServer)

lib/msf/core/handler/reverse_http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def payload_uri(req)
9999
"#{scheme}://#{callback_host}/"
100100
end
101101

102-
# Use the {#refname} to determine whether this handler uses SSL or not
102+
# Use the refname to determine whether this handler uses SSL or not
103103
#
104104
def ssl?
105105
!!(self.refname.index("https"))

0 commit comments

Comments
 (0)