Skip to content

Commit

Permalink
update rhost and rport calls
Browse files Browse the repository at this point in the history
  • Loading branch information
zgoldman-r7 committed Feb 13, 2024
1 parent c05c677 commit d18520a
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 118 deletions.
4 changes: 0 additions & 4 deletions lib/msf/base/sessions/mssql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ class Msf::Sessions::MSSQL
# @return [MSSQL::Client] The MSSQL client
attr_accessor :client
attr_accessor :platform, :arch
# @return [String] The address MSSQL is running on
attr_accessor :address
# @return [Integer] The port MSSQL is running on
attr_accessor :port
attr_reader :framework

def initialize(rstream, opts = {})
Expand Down
2 changes: 2 additions & 0 deletions lib/msf/core/exploit/remote/mssql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ module Exploit::Remote::MSSQL
include Msf::Exploit::Remote::Kerberos::Ticket::Storage
include Msf::Exploit::Remote::Kerberos::ServiceAuthenticator::Options

attr_accessor :mssql_client

#
# Creates an instance of a MSSQL exploit module.
#
Expand Down
8 changes: 8 additions & 0 deletions lib/rex/proto/mssql/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,14 @@ def powershell_upload_exec(exe, debug=false)
print_status("Be sure to cleanup #{var_payload}.exe...")
end

def address
rhost
end

def port
rport
end

protected

def rhost
Expand Down
Loading

0 comments on commit d18520a

Please sign in to comment.