Browse Source

Fix #5197, Fixed yard doc errors

Fix #5197 Fixed issues that caused errors during yard doc generation
thao doan 3 years ago
parent
commit
5e36a3128c

+ 1
- 1
lib/metasploit/framework/community_string_collection.rb View File

@@ -5,7 +5,7 @@ module Metasploit
5 5
 
6 6
     # This class is responsible for taking datastore options from the snmp_login module
7 7
     # and yielding appropriate {Metasploit::Framework::Credential}s to the {Metasploit::Framework::LoginScanner::SNMP}.
8
-    # This one has to be different from {credentialCollection} as it will only have a {Metasploit::Framework::Credential#public}
8
+    # This one has to be different from credentialCollection as it will only have a {Metasploit::Framework::Credential#public}
9 9
     # It may be slightly confusing that the attribues are called password and pass_file, because this is what the legacy
10 10
     # module used. However, community Strings are now considered more to be public credentials than private ones.
11 11
     class CommunityStringCollection

+ 2
- 2
lib/metasploit/framework/database.rb View File

@@ -18,10 +18,10 @@ module Metasploit
18 18
       # Module Methods
19 19
       #
20 20
 
21
-      # Returns first configuration pathname from {configuration_pathnames} or the overridding `:path`.
21
+      # Returns first configuration pathname from configuration_pathnames or the overridding `:path`.
22 22
       #
23 23
       # @param options [Hash{Symbol=>String}]
24
-      # @option options [String] :path Path to use instead of first element of {configurations_pathnames}
24
+      # @option options [String] :path Path to use instead of first element of configurations_pathnames
25 25
       # @return [Pathname] if configuration pathname exists.
26 26
       # @return [nil] if configuration pathname does not exist.
27 27
       def self.configurations_pathname(options={})

+ 2
- 2
lib/metasploit/framework/login_scanner/manageengine_desktop_central.rb View File

@@ -29,7 +29,7 @@ module Metasploit
29 29
 
30 30
         # Returns the latest sid from MSP
31 31
         #
32
-        # @param [Rex::Proto::Http::Response] 
32
+        # @param res [Rex::Proto::Http::Response] 
33 33
         # @return [String] The session ID for MSP
34 34
         def get_sid(res)
35 35
           cookies = res.get_cookies
@@ -41,7 +41,7 @@ module Metasploit
41 41
 
42 42
         # Returns the hidden inputs
43 43
         #
44
-        # @param [Rex::Proto::Http::Response]
44
+        # @param res [Rex::Proto::Http::Response]
45 45
         # @return [Hash] Input fields
46 46
         def get_hidden_inputs(res)
47 47
           found_inputs = {}

+ 1
- 1
lib/metasploit/framework/login_scanner/snmp.rb View File

@@ -60,7 +60,7 @@ module Metasploit
60 60
           end
61 61
         end
62 62
 
63
-        # Attempt to login with every {Credential credential} in # {#cred_details}.
63
+        # Attempt to login with every {Credential credential} in # #cred_details.
64 64
         #
65 65
         # @yieldparam result [Result] The {Result} object for each attempt
66 66
         # @yieldreturn [void]

+ 2
- 2
lib/metasploit/framework/spec/constants.rb View File

@@ -42,7 +42,7 @@ module Metasploit::Framework::Spec::Constants
42 42
   # Adds actions to `spec` task so that `rake spec` fails if any of the following:
43 43
   #
44 44
   # # `log/leaked-constants.log` exists after printing out the leaked constants.
45
-  # # {Each.configured!} is unnecessary in `spec/spec_helper.rb` and should be removed.
45
+  # # Each.configured! is unnecessary in `spec/spec_helper.rb` and should be removed.
46 46
   #
47 47
   # @return [void]
48 48
   def self.define_task
@@ -96,4 +96,4 @@ module Metasploit::Framework::Spec::Constants
96 96
 
97 97
     full_name
98 98
   end
99
-end
99
+end

+ 3
- 3
lib/metasploit/framework/spec/constants/each.rb View File

@@ -19,7 +19,7 @@ module Metasploit::Framework::Spec::Constants::Each
19 19
     attr_accessor :leaks_cleaned
20 20
   end
21 21
 
22
-  # Is {Metasploit::Framework::Spec::Constants::Each.configure!} still necessary or should it be removed?
22
+  # Is Metasploit::Framework::Spec::Constants::Each.configure! still necessary or should it be removed?
23 23
   #
24 24
   # @return [true] if {configure!}'s `before(:each)` cleaned up leaked constants
25 25
   # @return [false] otherwise
@@ -91,7 +91,7 @@ module Metasploit::Framework::Spec::Constants::Each
91 91
     !!@configured
92 92
   end
93 93
 
94
-  # Adds action to `spec` task so that `rake spec` fails if {configured!} is unnecessary in `spec/spec_helper.rb` and
94
+  # Adds action to `spec` task so that `rake spec` fails if configured! is unnecessary in `spec/spec_helper.rb` and
95 95
   # should be removed
96 96
   #
97 97
   # @return [void]
@@ -116,4 +116,4 @@ module Metasploit::Framework::Spec::Constants::Each
116 116
       end
117 117
     end
118 118
   end
119
-end
119
+end

+ 2
- 2
lib/metasploit/framework/spec/constants/suite.rb View File

@@ -6,7 +6,7 @@ module Metasploit::Framework::Spec::Constants::Suite
6 6
 
7 7
   LOGS_PATHNAME = Pathname.new('log/metasploit/framework/spec/constants/suite')
8 8
 
9
-  # Logs leaked constants to {LOG_PATHNAME} and prints `message` to stderr.
9
+  # Logs leaked constants to LOG_PATHNAME and prints `message` to stderr.
10 10
   #
11 11
   # @param hook (see log_pathname)
12 12
   # @param message [String] additional message printed to stderr when there is at least one leaked constant.
@@ -116,4 +116,4 @@ module Metasploit::Framework::Spec::Constants::Suite
116 116
 
117 117
     leaks
118 118
   end
119
-end
119
+end

+ 2
- 2
lib/metasploit/framework/thread_factory_provider.rb View File

@@ -1,5 +1,5 @@
1 1
 # Wraps {Msf::Framework} so that {Msf::Framework#threads} is only created on the first call to {#spawn} by
2
-# {Rex::ThreadFactory#spawn}, which allows the threads used by {Msf::ThreadManager} to be created lazily.
2
+# Rex::ThreadFactory#spawn, which allows the threads used by {Msf::ThreadManager} to be created lazily.
3 3
 #
4 4
 # @example Setting Rex::ThreadFactory.provider and spawning threads
5 5
 #   Rex::ThreadFactory.provider = Metasploit::Framework::ThreadFactoryProvider.new(framework: framework)
@@ -23,4 +23,4 @@ class Metasploit::Framework::ThreadFactoryProvider < Metasploit::Model::Base
23 23
   def spawn(name, critical, *args, &block)
24 24
     framework.threads.spawn(name, critical, *args, &block)
25 25
   end
26
-end
26
+end

+ 9
- 9
lib/msf/core/auxiliary/auth_brute.rb View File

@@ -49,7 +49,7 @@ module Auxiliary::AuthBrute
49 49
     @@max_per_service = nil
50 50
   end
51 51
 
52
-  # Yields each {Metasploit::Credential::Core} in the {Mdm::Workspace} with
52
+  # Yields each Metasploit::Credential::Core in the Mdm::Workspace with
53 53
   # a private type of 'ntlm_hash'
54 54
   #
55 55
   # @yieldparam [Metasploit::Credential::Core]
@@ -60,7 +60,7 @@ module Auxiliary::AuthBrute
60 60
     end
61 61
   end
62 62
 
63
-  # Yields each {Metasploit::Credential::Core} in the {Mdm::Workspace} with
63
+  # Yields each Metasploit::Credential::Core in the Mdm::Workspace with
64 64
   # a private type of 'password'
65 65
   #
66 66
   # @yieldparam [Metasploit::Credential::Core]
@@ -71,7 +71,7 @@ module Auxiliary::AuthBrute
71 71
     end
72 72
   end
73 73
 
74
-  # Yields each {Metasploit::Credential::Core} in the {Mdm::Workspace} with
74
+  # Yields each Metasploit::Credential::Core in the Mdm::Workspace with
75 75
   # a private type of 'ssh_key'
76 76
   #
77 77
   # @yieldparam [Metasploit::Credential::Core]
@@ -90,7 +90,7 @@ module Auxiliary::AuthBrute
90 90
     (datastore['DB_ALL_CREDS'] || datastore['DB_ALL_PASS'] || datastore['DB_ALL_USERS']) && framework.db.active
91 91
   end
92 92
 
93
-  # This method takes a {Metasploit::Framework::CredentialCollection} and prepends existing NTLMHashes
93
+  # This method takes a Metasploit::Framework::CredentialCollection and prepends existing NTLMHashes
94 94
   # from the database. This allows the users to use the DB_ALL_CREDS option.
95 95
   #
96 96
   # @param cred_collection [Metasploit::Framework::CredentialCollection]
@@ -105,7 +105,7 @@ module Auxiliary::AuthBrute
105 105
     cred_collection
106 106
   end
107 107
 
108
-  # This method takes a {Metasploit::Framework::CredentialCollection} and prepends existing SSHKeys
108
+  # This method takes a Metasploit::Framework::CredentialCollection and prepends existing SSHKeys
109 109
   # from the database. This allows the users to use the DB_ALL_CREDS option.
110 110
   #
111 111
   # @param [Metasploit::Framework::CredentialCollection] cred_collection
@@ -120,7 +120,7 @@ module Auxiliary::AuthBrute
120 120
     cred_collection
121 121
   end
122 122
 
123
-  # This method takes a {Metasploit::Framework::CredentialCollection} and prepends existing Password Credentials
123
+  # This method takes a Metasploit::Framework::CredentialCollection and prepends existing Password Credentials
124 124
   # from the database. This allows the users to use the DB_ALL_CREDS option.
125 125
   #
126 126
   # @param cred_collection [Metasploit::Framework::CredentialCollection]
@@ -135,9 +135,9 @@ module Auxiliary::AuthBrute
135 135
     cred_collection
136 136
   end
137 137
 
138
-  # Takes a {Metasploit::Credential::Core} and converts it into a
139
-  # {Metasploit::Framework::Credential} and processes it into the
140
-  # {Metasploit::Framework::CredentialCollection} as dictated by the
138
+  # Takes a Metasploit::Credential::Core and converts it into a
139
+  # Metasploit::Framework::Credential and processes it into the
140
+  # Metasploit::Framework::CredentialCollection as dictated by the
141 141
   # selected datastore options.
142 142
   #
143 143
   # @param [Metasploit::Framework::CredentialCollection] cred_collection the credential collection to add to

+ 2
- 2
lib/msf/core/auxiliary/report.rb View File

@@ -70,7 +70,7 @@ module Auxiliary::Report
70 70
   # This method safely get the workspace ID. It handles if the db is not active
71 71
   #
72 72
   # @return [NilClass] if there is no DB connection
73
-  # @return [Fixnum] the ID of the current {Mdm::Workspace}
73
+  # @return [Fixnum] the ID of the current Mdm::Workspace
74 74
   def myworkspace_id
75 75
     if framework.db.active
76 76
       myworkspace.id
@@ -169,7 +169,7 @@ module Auxiliary::Report
169 169
   # should be used directly instead.
170 170
   #
171 171
   # @param opts [Hash] the option hash
172
-  # @option opts [String] :host the address of the host (also takes a {Mdm::Host})
172
+  # @option opts [String] :host the address of the host (also takes a Mdm::Host)
173 173
   # @option opts [Fixnum] :port the port of the connected service
174 174
   # @option opts [Mdm::Service] :service an optional Service object to build the cred for
175 175
   # @option opts [String] :type What type of private credential this is (e.g. "password", "hash", "ssh_key")

+ 5
- 5
lib/msf/core/db_manager/import/metasploit_framework/xml.rb View File

@@ -88,7 +88,7 @@ module Msf::DBManager::Import::MetasploitFramework::XML
88 88
     report_note(note_data)
89 89
   end
90 90
 
91
-  # Imports web_form element using {Msf::DBManager#report_web_form}.
91
+  # Imports web_form element using Msf::DBManager#report_web_form.
92 92
   #
93 93
   # @param element [REXML::Element] web_form element.
94 94
   # @param options [Hash{Symbol => Object}] options
@@ -124,7 +124,7 @@ module Msf::DBManager::Import::MetasploitFramework::XML
124 124
     end
125 125
   end
126 126
 
127
-  # Imports web_page element using {Msf::DBManager#report_web_page}.
127
+  # Imports web_page element using Msf::DBManager#report_web_page.
128 128
   #
129 129
   # @param element [REXML::Element] web_page element.
130 130
   # @param options [Hash{Symbol => Object}] options
@@ -171,7 +171,7 @@ module Msf::DBManager::Import::MetasploitFramework::XML
171 171
     end
172 172
   end
173 173
 
174
-  # Imports web_vuln element using {Msf::DBManager#report_web_vuln}.
174
+  # Imports web_vuln element using Msf::DBManager#report_web_vuln.
175 175
   #
176 176
   # @param element [REXML::Element] web_vuln element.
177 177
   # @param options [Hash{Symbol => Object}] options
@@ -577,8 +577,8 @@ module Msf::DBManager::Import::MetasploitFramework::XML
577 577
   end
578 578
 
579 579
   # Imports web_form, web_page, or web_vuln element using
580
-  # {Msf::DBManager#report_web_form}, {Msf::DBManager#report_web_page}, and
581
-  # {Msf::DBManager#report_web_vuln}, respectively.
580
+  # Msf::DBManager#report_web_form, Msf::DBManager#report_web_page, and
581
+  # Msf::DBManager#report_web_vuln, respectively.
582 582
   #
583 583
   # @param element [REXML::Element] the web_form, web_page, or web_vuln
584 584
   #   element.

+ 3
- 3
lib/msf/core/db_manager/import/nexpose/raw.rb View File

@@ -196,8 +196,8 @@ module Msf::DBManager::Import::Nexpose::Raw
196 196
   # Takes an array of vuln hashes, as returned by the NeXpose rawxml stream
197 197
   # parser, like:
198 198
   #   [
199
-  #     {"id"=>"winreg-notes-protocol-handler", severity="8", "refs"=>[{"source"=>"BID", "value"=>"10600"}, ...]}
200
-  #     {"id"=>"windows-zotob-c", severity="8", "refs"=>[{"source"=>"BID", "value"=>"14513"}, ...]}
199
+  #     "id"=>"winreg-notes-protocol-handler", severity="8", "refs"=>["source"=>"BID", "value"=>"10600", ...]
200
+  #     "id"=>"windows-zotob-c", severity="8", "refs"=>["source"=>"BID", "value"=>"14513", ...]
201 201
   #   ]
202 202
   # and transforms it into a struct, containing :id, :refs, :title, and :severity
203 203
   #
@@ -227,4 +227,4 @@ module Msf::DBManager::Import::Nexpose::Raw
227 227
     end
228 228
     return ret
229 229
   end
230
-end
230
+end

+ 3
- 3
lib/msf/core/db_manager/session.rb View File

@@ -33,7 +33,7 @@ module Msf::DBManager::Session
33 33
   #     :session host is contained.  Also used as the workspace for the
34 34
   #     Mdm::ExploitAttempt and Mdm::Vuln.  Defaults to Mdm::Worksapce with
35 35
   #     Mdm::Workspace#name equal to +session.workspace+.
36
-  #   @return [nil] if {Msf::DBManager#active} is +false+.
36
+  #   @return [nil] if Msf::DBManager#active is +false+.
37 37
   #   @return [Mdm::Session] if session is saved
38 38
   #   @raise [ArgumentError] if :session is not an {Msf::Session}.
39 39
   #   @raise [ActiveRecord::RecordInvalid] if session is invalid and cannot be
@@ -68,7 +68,7 @@ module Msf::DBManager::Session
68 68
   #     exploit that was used to open the session.
69 69
   #   @option option [String] :via_payload the {MSf::Module#fullname} of the
70 70
   #     payload sent to the host when the exploit was successful.
71
-  #   @return [nil] if {Msf::DBManager#active} is +false+.
71
+  #   @return [nil] if Msf::DBManager#active is +false+.
72 72
   #   @return [Mdm::Session] if session is saved.
73 73
   #   @raise [ArgumentError] if :host is not an Mdm::Host.
74 74
   #   @raise [ActiveRecord::RecordInvalid] if session is invalid and cannot be
@@ -103,7 +103,7 @@ module Msf::DBManager::Session
103 103
 
104 104
   protected
105 105
 
106
-  # @param session [Msf::Session] A session with a {db_record Msf::Session#db_record}
106
+  # @param session [Msf::Session] A session with a db_record Msf::Session#db_record
107 107
   # @param wspace [Mdm::Workspace]
108 108
   # @return [void]
109 109
   def infer_vuln_from_session(session, wspace)

+ 2
- 2
lib/msf/core/exploit/browser_autopwn2.rb View File

@@ -409,8 +409,8 @@ module Msf
409 409
     # Checks if the module is multi-platform based on the directory path.
410 410
     #
411 411
     # @param m [Object] Module.
412
-    # @return Module [TrueClass] is multi-platform.
413
-    # @return Module [FalseClass] is not multi-platform.
412
+    # @return [TrueClass] is multi-platform.
413
+    # @return [FalseClass] is not multi-platform.
414 414
     def is_multi_platform_exploit?(m)
415 415
       m.fullname.include?('multi/')
416 416
     end

+ 3
- 3
lib/msf/core/exploit/remote/browser_exploit_server.rb View File

@@ -73,10 +73,10 @@ module Msf
73 73
       'vuln_test',    # Example: "if(window.MyComponentIsInstalled)return true;",
74 74
       # :activex is a special case.
75 75
       # When you set this requirement in your module, this is how it should be:
76
-      # [{:clsid=>'String', :method=>'String'}]
76
+      # [:clsid=>'String', :method=>'String']
77 77
       # Where each Hash is a test case
78 78
       # But when BES receives this information, the JavaScript will return this format:
79
-      # "{CLSID}=>Method=>Boolean;"
79
+      # "CLSID=>Method=>Boolean;"
80 80
       # Also see: #has_bad_activex?
81 81
       'activex'
82 82
     ])
@@ -216,7 +216,7 @@ module Msf
216 216
 
217 217
     # Returns true if there's a bad ActiveX, otherwise false.
218 218
     # @param ax [String] The raw activex the JavaScript detection will return in this format:
219
-    #                    "{CLSID}=>Method=>Boolean;"
219
+    #                    "CLSID=>Method=>Boolean;"
220 220
     # @return [Boolean] True if there's a bad ActiveX, otherwise false
221 221
     def has_bad_activex?(ax)
222 222
       ax.to_s.split(';').each do |a|

+ 1
- 1
lib/msf/core/handler/reverse_http.rb View File

@@ -106,7 +106,7 @@ module ReverseHttp
106 106
     "#{scheme}://#{callback_host}/"
107 107
   end
108 108
 
109
-  # Use the {#refname} to determine whether this handler uses SSL or not
109
+  # Use the #refname to determine whether this handler uses SSL or not
110 110
   #
111 111
   def ssl?
112 112
     !!(self.refname.index('https'))

+ 2
- 2
lib/msf/core/module_set.rb View File

@@ -183,8 +183,8 @@ class Msf::ModuleSet < Hash
183 183
   # @option info [Array<String>] 'files' List of paths to files that defined
184 184
   #   +klass+.
185 185
   # @return [Class] The klass parameter modified to have
186
-  #   {Msf::Module#framework}, {Msf::Module#refname}, {Msf::Module#file_path},
187
-  #   and {Msf::Module#orig_cls} set.
186
+  #   Msf::Module.framework, Msf::Module#refname, Msf::Module#file_path,
187
+  #   and Msf::Module#orig_cls set.
188 188
   def add_module(klass, reference_name, info = {})
189 189
     # Set the module's reference_name so that it can be referenced when
190 190
     # instances are created.

+ 1
- 1
lib/msf/core/post.rb View File

@@ -53,7 +53,7 @@ class Msf::Post < Msf::Module
53 53
     mod
54 54
   end
55 55
 
56
-  # This method returns the ID of the {Mdm::Session} that the post module
56
+  # This method returns the ID of the Mdm::Session that the post module
57 57
   # is currently running against.
58 58
   #
59 59
   # @return [NilClass] if there is no database record for the session

+ 7
- 4
lib/rex/parser/fs/bitlocker.rb View File

@@ -1,10 +1,13 @@
1 1
 # -*- coding: binary -*-
2
+
3
+require 'openssl/ccm'
4
+require 'metasm'
5
+
2 6
 ##
3 7
 # This module requires Metasploit: http://metasploit.com/download
4 8
 # Current source: https://github.com/rapid7/metasploit-framework
5 9
 ##
6
-require 'openssl/ccm'
7
-require 'metasm'
10
+
8 11
 module Rex
9 12
   module Parser
10 13
     ###
@@ -112,7 +115,7 @@ module Rex
112 115
 
113 116
       # Parse the metadata_entries and return a hashmap using the
114 117
       # following format:
115
-      # {metadata_entry_type => {metadata_value_type => [fve_entry,...]}}
118
+      # metadata_entry_type => metadata_value_type => [fve_entry,...]
116 119
       def fve_entries(metadata_entries)
117 120
         offset_entry = 0
118 121
         entry_size = metadata_entries[0, 2].unpack('v')[0]
@@ -215,7 +218,7 @@ module Rex
215 218
       end
216 219
 
217 220
       # Produce a hash map using the following format:
218
-      # {PROTECTION_TYPE => [fve_entry, fve_entry...]}
221
+      # PROTECTION_TYPE => [fve_entry, fve_entry...]
219 222
       def vmk_entries
220 223
         res = {}
221 224
         (@fve_metadata_entries[ENTRY_TYPE_VMK][VALUE_TYPE_VMK]).each do |vmk|

+ 0
- 4
lib/rex/proto/adb/client.rb View File

@@ -1,9 +1,5 @@
1 1
 # -*- coding: binary -*-
2 2
 
3
-##
4
-# ADB protocol support
5
-##
6
-
7 3
 require 'rex/proto/adb/message'
8 4
 
9 5
 module Rex

+ 1
- 1
lib/rex/proto/steam/message.rb View File

@@ -52,7 +52,7 @@ module Steam
52 52
 
53 53
   # Decodes an A2S_INFO response message
54 54
   #
55
-  # @parameter response [String] the A2S_INFO resposne to decode
55
+  # @param response [String] the A2S_INFO resposne to decode
56 56
   # @return [Hash] the fields extracted from the response
57 57
   def a2s_info_decode(response)
58 58
     # abort if it is impossibly short

+ 2
- 2
plugins/request.rb View File

@@ -216,7 +216,7 @@ class Plugin::Requests < Msf::Plugin
216 216
     #   response.
217 217
     # @option opts [Boolean] :print_headers Whether or not to print the headers
218 218
     #   of the response.
219
-    # @options opts [String] :ssl_version The version of SSL to use if the
219
+    # @option opts [String] :ssl_version The version of SSL to use if the
220 220
     #   request scheme is HTTPS.
221 221
     # @option opts [String] :uri The target uri to request.
222 222
     # @option opts [String] :user_agent The value to use in the User-Agent
@@ -247,7 +247,7 @@ class Plugin::Requests < Msf::Plugin
247 247
     #   response.
248 248
     # @option opts [Boolean] :print_headers Whether or not to print the headers
249 249
     #   of the response.
250
-    # @options opts [String] :ssl_version The version of SSL to use if the
250
+    # @option opts [String] :ssl_version The version of SSL to use if the
251 251
     #   request scheme is HTTPS.
252 252
     # @option opts [String] :uri The target uri to request.
253 253
     # @option opts [String] :user_agent The value to use in the User-Agent

Loading…
Cancel
Save