Add documentation for SMB_COM_READ_ANDX
parent
1ad3f91c50
commit
e8dd9c1971
|
@ -5,12 +5,13 @@ module Msf
|
|||
module Share
|
||||
module Command
|
||||
module ReadAndx
|
||||
|
||||
# Handles an SMB_COM_READ_ANDX command, used by the client to read data from a
|
||||
# file.
|
||||
#
|
||||
# Responds to a client READ_ANDX request
|
||||
# This function sends chunks of the payload to the client
|
||||
# by reading the offset and length requested by the client
|
||||
# and sending the appropriate chunk of the payload
|
||||
#
|
||||
# @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_read_andx(c, buff)
|
||||
pkt = CONST::SMB_READ_PKT.make_struct
|
||||
pkt.from_s(buff)
|
||||
|
@ -25,6 +26,14 @@ 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>}] Response custom values.
|
||||
# @option opts [Fixnum] :data_len_low The length of the file data sent back.
|
||||
# @option opts [Fixnum] :byte_count The length of the file data sent back.
|
||||
# @option opts [String] :data The bytes read from the file.
|
||||
# @return [Fixnum] The number of bytes returned to the client as response.
|
||||
def send_read_andx_res(c, opts = {})
|
||||
data_len_low = opts[:data_len_low]
|
||||
byte_count = opts[:byte_count]
|
||||
|
|
Loading…
Reference in New Issue