Skip to content

Commit

Permalink
Normalize handlers names
Browse files Browse the repository at this point in the history
  • Loading branch information
jvazquez-r7 committed Feb 28, 2015
1 parent 1d602d3 commit eb7ac02
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/msf/core/exploit/smb/server/share.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,17 @@ def smb_cmd_dispatch(cmd, c, buff)
when CONST::SMB_COM_SESSION_SETUP_ANDX
word_count = pkt['Payload']['SMB'].v['WordCount']
if word_count == 0x0D # Share Security Mode sessions
smb_cmd_session_setup(c, buff)
smb_cmd_session_setup_andx(c, buff)
else
print_status("SMB Share - #{smb[:ip]} Unknown SMB_COM_SESSION_SETUP_ANDX request type , ignoring... ")
smb_error(cmd, c, CONST::SMB_STATUS_SUCCESS)
end
when CONST::SMB_COM_TRANSACTION2
smb_cmd_trans(c, buff)
smb_cmd_trans2(c, buff)
when CONST::SMB_COM_NT_CREATE_ANDX
smb_cmd_create(c, buff)
smb_cmd_nt_create_andx(c, buff)
when CONST::SMB_COM_READ_ANDX
smb_cmd_read(c, buff)
smb_cmd_read_andx(c, buff)
when CONST::SMB_COM_CLOSE
smb_cmd_close(c, buff)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module NtCreateAndx
#
# Responds to a client NT_CREATE_ANDX request
#
def smb_cmd_create(c, buff)
def smb_cmd_nt_create_andx(c, buff)
smb = @state[c]
pkt = CONST::SMB_CREATE_PKT.make_struct
pkt.from_s(buff)
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit/smb/server/share/command/read_andx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module ReadAndx
# by reading the offset and length requested by the client
# and sending the appropriate chunk of the payload
#
def smb_cmd_read(c, buff)
def smb_cmd_read_andx(c, buff)
pkt = CONST::SMB_READ_PKT.make_struct
pkt.from_s(buff)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module SessionSetupAndx
#
# Sets up an SMB session in response to a SESSION_SETUP_ANDX request
#
def smb_cmd_session_setup(c, buff)
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'] = 7
tree_connect_response.v['AndXCommand'] = CONST::SMB_COM_NO_ANDX_COMMAND
Expand Down
2 changes: 1 addition & 1 deletion lib/msf/core/exploit/smb/server/share/command/trans2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module Trans2
# QUERY_FILE_INFO (Basic, Standard and Internal)
# QUERY_PATH_INFO (Basic and Standard)
#
def smb_cmd_trans(c, buff)
def smb_cmd_trans2(c, buff)
pkt = CONST::SMB_TRANS2_PKT.make_struct
pkt.from_s(buff)

Expand Down

0 comments on commit eb7ac02

Please sign in to comment.