Module: Msf::Exploit::Remote::SMB::Server::Share::Command::Close
- Included in:
- Msf::Exploit::Remote::SMB::Server::Share
- Defined in:
- lib/msf/core/exploit/remote/smb/server/share/command/close.rb
Instance Method Summary collapse
-
#send_close_res(c) ⇒ Integer
Builds and sends an SMB_COM_CLOSE response.
-
#smb_cmd_close(c, buff) ⇒ Integer
Handles an SMB_COM_CLOSE command, used by the client to close an instance of an object associated with a valid FID.
Instance Method Details
#send_close_res(c) ⇒ Integer
Builds and sends an SMB_COM_CLOSE response.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/msf/core/exploit/remote/smb/server/share/command/close.rb', line 23 def send_close_res(c) pkt = CONST::SMB_CLOSE_RES_PKT.make_struct smb_set_defaults(c, pkt) pkt['Payload']['SMB'].v['Command'] = CONST::SMB_COM_CLOSE pkt['Payload']['SMB'].v['Flags1'] = FLAGS pkt['Payload']['SMB'].v['Flags2'] = FLAGS2 pkt['Payload']['SMB'].v['WordCount'] = CONST::SMB_CLOSE_RES_WORD_COUNT c.put(pkt.to_s) end |
#smb_cmd_close(c, buff) ⇒ Integer
Handles an SMB_COM_CLOSE command, used by the client to close an instance of an object associated with a valid FID.
15 16 17 |
# File 'lib/msf/core/exploit/remote/smb/server/share/command/close.rb', line 15 def smb_cmd_close(c, buff) send_close_res(c) end |