mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-19 12:07:05 +02:00
fix nesting
This commit is contained in:
parent
2096306107
commit
cfb459b832
@ -203,11 +203,11 @@ val patch = bytecodePatch {
|
|||||||
>
|
>
|
||||||
> ```kt
|
> ```kt
|
||||||
> fingerprint(fuzzyPatternScanThreshhold = 2) {
|
> fingerprint(fuzzyPatternScanThreshhold = 2) {
|
||||||
> opcodes(
|
> opcodes(
|
||||||
> Opcode.ICONST_0,
|
> Opcode.ICONST_0,
|
||||||
> null,
|
> null,
|
||||||
> Opcode.ICONST_1,
|
> Opcode.ICONST_1,
|
||||||
> Opcode.IRETURN,
|
> Opcode.IRETURN,
|
||||||
> )
|
> )
|
||||||
>}
|
>}
|
||||||
> ```
|
> ```
|
||||||
@ -247,7 +247,7 @@ you can match the fingerprint on the list of classes:
|
|||||||
```kt
|
```kt
|
||||||
execute {
|
execute {
|
||||||
val match = showAdsFingerprint.match(classes) ?: throw PatchException("No match found")
|
val match = showAdsFingerprint.match(classes) ?: throw PatchException("No match found")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- In a **single class**, if the fingerprint can match in a single known class
|
- In a **single class**, if the fingerprint can match in a single known class
|
||||||
@ -271,14 +271,14 @@ you can match the fingerprint on the list of classes:
|
|||||||
```kt
|
```kt
|
||||||
execute {
|
execute {
|
||||||
val currentPlanFingerprint = fingerprint {
|
val currentPlanFingerprint = fingerprint {
|
||||||
strings("free", "trial")
|
strings("free", "trial")
|
||||||
}
|
}
|
||||||
|
|
||||||
currentPlanFingerprint.match(adsFingerprintMatch.method)?.let { match ->
|
currentPlanFingerprint.match(adsFingerprintMatch.method)?.let { match ->
|
||||||
match.stringMatches.forEach { match ->
|
match.stringMatches.forEach { match ->
|
||||||
println("The index of the string '${match.string}' is ${match.index}")
|
println("The index of the string '${match.string}' is ${match.index}")
|
||||||
}
|
}
|
||||||
} ?: throw PatchException("No match found")
|
} ?: throw PatchException("No match found")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user