Class: Msf::Exploit::Remote::LDAP::ActiveDirectory::SecurityDescriptorMatcher::MultipleAny
- Inherits:
-
Base
- Object
- Base
- Msf::Exploit::Remote::LDAP::ActiveDirectory::SecurityDescriptorMatcher::MultipleAny
- 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
Instance Attribute Summary collapse
-
#matchers ⇒ Object
readonly
Returns the value of attribute matchers.
Instance Method Summary collapse
- #apply_ace!(ace) ⇒ Object
- #ignore_ace?(ace) ⇒ Boolean
-
#initialize(matchers) ⇒ MultipleAny
constructor
A new instance of MultipleAny.
- #matches? ⇒ Boolean
- #satisfied? ⇒ Boolean
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
#matchers ⇒ Object (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
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
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
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 |