You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+21-13Lines changed: 21 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,21 +53,29 @@ Looks for `byte[]` and `int[]` fields initialised with a `FilledNewArrayNode` of
53
53
54
54
### Detection logic (`B64Detector`)
55
55
56
-
`B64Detector.detect(String, B64DeobfuscateOptions)`applies a pipeline of filters (all thresholds configurable via options):
56
+
`B64Detector.detect(String, B64DeobfuscateOptions)`runs an ordered pipeline (all thresholds configurable via options). The pre-decode filters live in the `INPUT_FILTERS` array and short-circuit on the first rejection:
57
57
58
58
1. Blocklist check (`B64FalsePositives`) — known false positives (e.g. Android class names) rejected first
`B64Detector.decodeForced(String, int)` skips steps 1–9 and uses `CodingErrorAction.REPLACE` instead of `REPORT`. Used when the string is an explicit arg to a `Base64.decode` call.
59
+
2. Valid Base64 length (`requireValidLength`, default true) — length *excluding*`\n`/`\r` must be divisible by 4 (line breaks are stripped via `significantLength` so PEM/MIME-wrapped strings aren't rejected for their wrapping)
60
+
3. Identifier-shape skips, only applied to strings under 40 chars:
-`B64Detector.decodeForced(String, int)` — skips all charset and heuristic filters and uses `CodingErrorAction.REPLACE` instead of `REPORT`. Used when the string is an explicit arg to a `Base64.decode`-like call (recognised by `B64DecodeCalls.isDecodeCall`).
78
+
-`B64Detector.decodeIfValid(String, int)` — applies only the charset check + strict UTF-8 decode, no heuristic filters. Used for sibling array elements once one element in the array has passed full detection (the "anchor").
0 commit comments