Skip to content

Commit a0eb7d0

Browse files
author
Brent Cook
committed
minor RPC documentation tweaks
1 parent 46361c1 commit a0eb7d0

File tree

7 files changed

+19
-16
lines changed

7 files changed

+19
-16
lines changed

lib/msf/core/rpc/v10/client.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Client
2222

2323

2424
# Initializes the RPC client to connect to: https://127.0.0.1:3790 (TLS1)
25+
# The connection information is overridden through the optional info hash.
2526
#
2627
# @param [Hash] info Information needed for the initialization.
2728
# @option info [String] :token A token used by the client.

lib/msf/core/rpc/v10/rpc_auth.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def rpc_logout(token)
8080
end
8181

8282

83-
# Returns a list of authentication tokens including the temporary ones, permanent, or the ones
84-
# stored in the backend.
83+
# Returns a list of authentication tokens, including the ones that are
84+
# temporary, permanent, or stored in the backend.
8585
#
8686
# @return [Hash] A hash that contains a list of authentication tokens. It contains the following key:
8787
# * 'tokens' [Array<string>] An array of tokens.
@@ -130,7 +130,8 @@ def rpc_token_add(token)
130130
end
131131

132132

133-
# Generates a random 32-byte authentication token, and automatically saved to the database.
133+
# Generates a random 32-byte authentication token. The token is added to the
134+
# database as a side-effect.
134135
#
135136
# @return [Hash] A hash indicating the action was successful, also the new token.
136137
# It contains the following keys:

lib/msf/core/rpc/v10/rpc_console.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def rpc_tabs(cid, line)
143143
end
144144

145145

146-
# Kills a framework session that serves the same purpose as [CTRL]+[C] to abort an interactive session.
146+
# Kills a framework session. This serves the same purpose as [CTRL]+[C] to abort an interactive session.
147147
# You might also want to considering using the session API calls instead of this.
148148
#
149149
# @param [Fixnum] cid Framework console ID.
@@ -159,7 +159,8 @@ def rpc_session_kill(cid)
159159
end
160160

161161

162-
# Detaches a framework session that serves the same purpos as [CTRL]+[Z] to background an interactive session.
162+
# Detaches a framework session. This serves the same purpose as [CTRL]+[Z] to
163+
# background an interactive session.
163164
#
164165
# @param [Fixnum] cid Framework console ID.
165166
# @return [Hash] A hash indicating whether the action was successful or not. It contains:

lib/msf/core/rpc/v10/rpc_db.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,7 @@ def rpc_report_loot(xopts)
14761476
end
14771477

14781478

1479-
# Returns all the looted data.
1479+
# Returns all the looted items.
14801480
#
14811481
# @param [Hash] xopts Filters that narrow down the search:
14821482
# @option xopts [Hash] :workspace Workspace name.
@@ -1765,7 +1765,7 @@ def rpc_del_client(xopts)
17651765
end
17661766

17671767

1768-
# Sets the driver for the database, or returns the current one.
1768+
# Sets the driver for the database or returns the current one.
17691769
#
17701770
# @param [Hash] xopts Options:
17711771
# @option [String] :workspace Workspace name.

lib/msf/core/rpc/v10/rpc_module.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def rpc_post
7070
end
7171

7272

73-
# Returns the metadata of the module.
73+
# Returns the metadata for a module.
7474
#
7575
# @param [String] mtype Module type. Supported types include (case-sensitive):
7676
# * exploit
@@ -279,7 +279,7 @@ def rpc_encode_formats
279279
end
280280

281281

282-
# Encoders data with an encoder.
282+
# Encodes data with an encoder.
283283
#
284284
# @param [String] data Data to encode.
285285
# @param [encoder] encoder Encoder module name. For example: 'x86/single_byte'.

lib/msf/core/rpc/v10/rpc_plugin.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module Msf
33
module RPC
44
class RPC_Plugin < RPC_Base
55

6-
# Loads a framework plugin.
6+
# Loads a plugin.
77
#
88
# @param [String] path The plugin filename (without the extension). It will try to find your plugin
99
# in either one of these directories:
@@ -48,7 +48,7 @@ def rpc_load(path, xopts = {})
4848
end
4949

5050

51-
# Unloads a framework plugin.
51+
# Unloads a plugin.
5252
#
5353
# @param [String] name The plugin filename (without the extension). For example: 'nexpose'.
5454
# @return [Hash] A hash indicating whether the action was successful or not.
@@ -69,7 +69,7 @@ def rpc_unload(name)
6969
end
7070

7171

72-
# Returns a list of plugins loaded by framework.
72+
# Returns a list of loaded plugins.
7373
#
7474
# @return [Hash] All the plugins loaded. It contains the following key:
7575
# * 'plugins' [Array<string>] A list of plugin names.

lib/msf/core/rpc/v10/rpc_session.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def rpc_shell_upgrade( sid, lhost, lport)
157157
# @raise [Msf::RPC::Exception] An error that could be one of these:
158158
# * 500 Session ID is unknown.
159159
# * 500 Invalid session type.
160-
# @return [Hash] It contains the following key:
160+
# @return [Hash] It contains the following key:
161161
# * 'data' [String] Data read.
162162
# @example Here's how you would use this from the client:
163163
# rpc.call('session.meterpreter_read', 2)
@@ -314,7 +314,7 @@ def rpc_meterpreter_session_detach(sid)
314314
end
315315

316316

317-
# Kills a meterpreter session. Serves the same purpose as [CTRL]+[C]
317+
# Kills a meterpreter session. Serves the same purpose as [CTRL]+[C].
318318
#
319319
# @param [Fixnum] sid Session ID.
320320
# @raise [Msf::RPC::Exception] An error that could be one of these:
@@ -365,7 +365,7 @@ def rpc_meterpreter_tabs(sid, line)
365365
# * 500 Session ID is unknown.
366366
# * 500 Invalid session type.
367367
# @return [Hash] A hash indicating the action was successful. It contains the following key:
368-
# * 'result' [String] 'success'
368+
# * 'result' [String] 'success'
369369
# @example Here's how you would use this from the client:
370370
# rpc.call('session.meterpreter_run_single', 3, 'getpid')
371371
def rpc_meterpreter_run_single( sid, data)
@@ -388,7 +388,7 @@ def rpc_meterpreter_run_single( sid, data)
388388
# @param [Fixnum] sid Session ID.
389389
# @param [String] data Meterpreter script name.
390390
# @return [Hash] A hash indicating the action was successful. It contains the following key:
391-
# * 'result' [String] 'success'
391+
# * 'result' [String] 'success'
392392
# @example Here's how you would use this from the client:
393393
# rpc.call('session.meterpreter_script', 3, 'checkvm')
394394
def rpc_meterpreter_script( sid, data)

0 commit comments

Comments
 (0)