Skip to content

Commit 6e39738

Browse files
committed
misc: adding the binary mask operator to GRAMMA.MD
1 parent 4afdc24 commit 6e39738

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bmatcher/GRAMMA.MD

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ Spaces between the hexadecimal values are optional. The following example is equ
2222
FFDE0123
2323
```
2424

25+
## Masked Binary Data (`<hex> & <hex>`)
26+
27+
The **Masked Match Binary Data** operator is extends the Binary Data Operator. It performs a byte-by-byte comparison of the input with the specified hexadecimal values under the given mask (binary and). Each byte and mask entry must be written in hexadecimal format and padded to two digits.
28+
29+
The following example searches for the hexadecimal sequence `0xFF 0xEE` wit hthe mask `0xFF 0x0F` in the target:
30+
31+
```pattern
32+
FFEE & FF0F
33+
```
34+
35+
In opposition to the Binary Data operator, spaces are not allowed in the binary and the mask data.
36+
2537
## Byte Wildcard (`?`)
2638

2739
The Byte Wildcard operator (`?`) matches any byte value, serving as the opposite of the Match Binary Data operator.

0 commit comments

Comments
 (0)