Skip to content

Commit 51896bc

Browse files
committed
land rapid7#2984, @wchen-r7's [FixRM rapid7#8765] NameError uninitialized constant in enum_ad_user_comments
2 parents 8b25b6e + ce2de8f commit 51896bc

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

modules/post/windows/gather/enum_ad_user_comments.rb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,10 @@ def run
4646
if q.nil? or q[:results].empty?
4747
return
4848
end
49-
rescue ::Exception => e
50-
if e.kind_of?(RuntimeError) or e.kind_of?(RequestError)
51-
# Can't bind or in a network w/ limited accounts
52-
print_error(e.message)
53-
return
54-
else
55-
# Unexpected, raise it
56-
raise $1
57-
end
49+
rescue ::RuntimeError, ::Rex::Post::Meterpreter::RequestError => e
50+
# Can't bind or in a network w/ limited accounts
51+
print_error(e.message)
52+
return
5853
end
5954

6055
# Results table holds raw string data

0 commit comments

Comments
 (0)