Add documentation for SMB_COM_SESSION_SETUP_ANDX handling
parent
e8dd9c1971
commit
3923589286
|
@ -5,9 +5,12 @@ module Msf
|
|||
module Share
|
||||
module Command
|
||||
module SessionSetupAndx
|
||||
|
||||
# Handles an SMB_COM_SESSION_SETUP_ANDX command, used by the client to configure an SMB Session.
|
||||
#
|
||||
# Sets up an SMB session in response to a SESSION_SETUP_ANDX request
|
||||
#
|
||||
# @param c [Socket] The client sending the request.
|
||||
# @param buff [String] The data including the client request.
|
||||
# @return [Fixnum] The number of bytes returned to the client as response.
|
||||
def smb_cmd_session_setup_andx(c, buff)
|
||||
tree_connect_response = CONST::SMB_TREE_CONN_ANDX_RES_PKT.make_struct
|
||||
tree_connect_response.v['WordCount'] = CONST::SMB_TREE_CONN_ANDX_WORD_COUNT
|
||||
|
@ -32,6 +35,18 @@ module Msf
|
|||
})
|
||||
end
|
||||
|
||||
# Builds and sends an SMB_COM_NT_CREATE_ANDX response.
|
||||
#
|
||||
# @param c [Socket] The client to answer.
|
||||
# @param opts [Hash{Symbol => <Fixnum, String, Rex::Struct2::CStruct>}] Response custom values.
|
||||
# @option opts [Fixnum] :action SMB Configuration result.
|
||||
# @option opts [Fixnum] :andx_offset The offset in bytes from the start of the SMB Header to the start
|
||||
# of the WordCount field in the next SMBCommand.
|
||||
# @option opts [Fixnum] :reserved Reserved field.
|
||||
# @option opts [Fixnum] :andx The command code for the next SMB Command in the packet.
|
||||
# @option opts [String] :data The SMB_Data for the SMB_COM_SESSION_SETUP_ANDX response.
|
||||
# @option opts [Rex::Struct2::CStruct] :andx_command The next SMB Command in the packet.
|
||||
# @return [Fixnum] The number of bytes returned to the client as response.
|
||||
def send_session_setup_andx_res(c, opts = {})
|
||||
action = opts[:action] || 0
|
||||
andx_offset = opts[:andx_offset] || 0
|
||||
|
|
Loading…
Reference in New Issue