Class: Msf::Exploit::Remote::LDAP::ActiveDirectory::SecurityDescriptorMatcher::MultipleAny

Inherits:
Base
  • Object
show all
Defined in:
lib/msf/core/exploit/remote/ldap/active_directory/security_descriptor_matcher.rb

Overview

A compound matcher that will match when any of the sub-matchers match.

Direct Known Subclasses

MultipleAll

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(matchers) ⇒ MultipleAny

Returns a new instance of MultipleAny.



140
141
142
# File 'lib/msf/core/exploit/remote/ldap/active_directory/security_descriptor_matcher.rb', line 140

def initialize(matchers)
  @matchers = Array.wrap(matchers)
end

Instance Attribute Details

#matchersObject (readonly)

Returns the value of attribute matchers.



138
139
140
# File 'lib/msf/core/exploit/remote/ldap/active_directory/security_descriptor_matcher.rb', line 138

def matchers
  @matchers
end

Instance Method Details

#apply_ace!(ace) ⇒ Object



148
149
150
151
152
153
154
155
156
# File 'lib/msf/core/exploit/remote/ldap/active_directory/security_descriptor_matcher.rb', line 148

def apply_ace!(ace)
  @matchers.each do |matcher|
    next if matcher.ignore_ace?(ace)

    matcher.apply_ace!(ace)
  end

  nil
end

#ignore_ace?(ace) ⇒ Boolean

Returns:

  • (Boolean)


144
145
146
# File 'lib/msf/core/exploit/remote/ldap/active_directory/security_descriptor_matcher.rb', line 144

def ignore_ace?(ace)
  @matchers.all? { |matcher| matcher.ignore_ace?(ace) }
end

#matches?Boolean

Returns:

  • (Boolean)


162
163
164
# File 'lib/msf/core/exploit/remote/ldap/active_directory/security_descriptor_matcher.rb', line 162

def matches?
  @matchers.any? { |matcher| matcher.matches? }
end

#satisfied?Boolean

Returns:

  • (Boolean)


158
159
160
# File 'lib/msf/core/exploit/remote/ldap/active_directory/security_descriptor_matcher.rb', line 158

def satisfied?
  @matchers.any? { |matcher| matcher.satisfied? }
end