Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

SECRET//ORCON//NOFORN
6 Xor
Description
The “xor” operator allows for one or more embedded rules. If only one of the
embedded rules returns true, the operator will return true. If more than one
embedded rule returns true, the operator will return false. Otherwise, if an
embedded rule returns invalid, and the operator would normally return false,
it will return invalid.
Short Circuit
If at any point during processing of the embedded rules, more than one true
is returned, the remaining rules will be ignored and the operator will return
false.
Usage
xor {
<rule>
}
Example
xor {
grasshopper.bitness(32)
grasshopper.access_at_least(“admin”)
}
The above example will return true if either the grasshopper binary is 32-bit
or the run level is administrator or higher, but not both. If either rule returns
an invalid, the operator will return invalid due to the inability to guarantee
the rule isn’t true.
Return Values
Return
Code
Description
True If one and only one embedded rule returns true, and
there are no invalids.
False If more than one true is returned. If no invalid have
been found, and no true results have been returned.
Invalid If either no embedded rules return true or one returns
true, and at least one returns invalid.
41
SECRET//ORCON//NOFORN

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh