Skip to content

Commit 5be12c1

Browse files
committed
add verbose output
1 parent 501224f commit 5be12c1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/post/windows/gather/local_admin_search_enum.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def enum_users(host)
105105
mem = client.railgun.memread(startmem, 8*count)
106106
rescue ::Exception => e
107107
print_error("Issue reading memory for #{host}")
108+
print_error(e.backtrace) if datastore['VERBOSE']
108109
end
109110
# For each entry returned, get domain and name of logged in user
110111
begin
@@ -153,6 +154,7 @@ def enum_groups(user)
153154

154155
rescue ::Exception => e
155156
print_error("Issue connecting to DC, try manually setting domain and DC")
157+
print_error(e.backtrace) if datastore['VERBOSE']
156158
end
157159

158160
count = usergroups['totalentries']
@@ -163,6 +165,7 @@ def enum_groups(user)
163165
mem = client.railgun.memread(startmem, 8*count)
164166
rescue ::Exception => e
165167
print_error("Issue reading memory for groups for user #{user}")
168+
print_error(e.backtrace) if datastore['VERBOSE']
166169
end
167170

168171
begin
@@ -182,6 +185,7 @@ def enum_groups(user)
182185
183186
rescue ::Exception => e
184187
print_error("Issue enumerating groups for user #{user}, check domain")
188+
print_error(e.backtrace) if datastore['VERBOSE']
185189
end
186190
187191
return grouplist.chomp("\n\t- ")

0 commit comments

Comments
 (0)