File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed
modules/auxiliary/admin/mssql Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -47,17 +47,6 @@ def run
47
47
return
48
48
end
49
49
50
- # Query for sysadmin status
51
- print_status ( "Checking if #{ datastore [ 'USERNAME' ] } has the sysadmin role..." )
52
- user_status = check_sysadmin
53
-
54
- # Check if user has sysadmin role
55
- if user_status == 1
56
- print_good ( "#{ datastore [ 'USERNAME' ] } is a sysadmin." )
57
- else
58
- print_status ( "#{ datastore [ 'USERNAME' ] } is NOT a sysadmin." )
59
- end
60
-
61
50
# Get the server name
62
51
sql_server_name = get_sql_server_name
63
52
print_status ( "SQL Server Name: #{ sql_server_name } " )
@@ -138,23 +127,6 @@ def run
138
127
print_status ( "Query results have been saved to: #{ path } " )
139
128
end
140
129
141
- # Checks if user is a sysadmin
142
- def check_sysadmin
143
-
144
- # Setup query to check for sysadmin
145
- sql = "select is_srvrolemember('sysadmin') as IsSysAdmin"
146
-
147
- # Run query
148
- result = mssql_query ( sql )
149
-
150
- # Parse query results
151
- parse_results = result [ :rows ]
152
- status = parse_results [ 0 ] [ 0 ]
153
-
154
- # Return status
155
- return status
156
- end
157
-
158
130
# Get list of windows accounts,groups,and computer accounts
159
131
def get_win_domain_users ( windows_domain_sid )
160
132
You can’t perform that action at this time.
0 commit comments