Skip to content

Commit

Permalink
Add support for newer sqlcmd versions
Browse files Browse the repository at this point in the history
  • Loading branch information
adfoster-r7 committed Jan 31, 2024
1 parent 15d22d2 commit ada1307
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/msf/core/post/windows/mssql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def check_osql
# @return [Boolean] true if sqlcmd is present
def check_sqlcmd
result = run_cmd('sqlcmd -?')
result =~ /SQL Server Command Line Tool/i
result =~ /SQL Server Command Line Tool|Version v\d+/i
end

# Runs a SQL query using the identified command line tool
Expand Down
4 changes: 2 additions & 2 deletions modules/post/windows/manage/mssql_local_auth_bypass.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def initialize(info = {})

register_options(
[
OptString.new('DB_USERNAME', [true, 'New sysadmin login', '']),
OptString.new('DB_PASSWORD', [true, 'Password for new sysadmin login', '']),
OptString.new('DB_USERNAME', [true, 'New sysadmin login', nil]),
OptString.new('DB_PASSWORD', [true, 'Password for new sysadmin login', nil]),
OptString.new('INSTANCE', [false, 'Name of target SQL Server instance', nil]),
OptBool.new('REMOVE_LOGIN', [true, 'Remove DB_USERNAME login from database', false])
]
Expand Down

0 comments on commit ada1307

Please sign in to comment.