mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-01 05:44:24 +02:00
chore: merge branch dev
to main
(#156)
This commit is contained in:
commit
f1336f89e4
@ -1,3 +1,10 @@
|
|||||||
|
## [6.4.3-dev.1](https://github.com/revanced/revanced-patcher/compare/v6.4.2...v6.4.3-dev.1) (2023-02-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* check `CONST_STRING_JUMP` instructions for matching string ([058d292](https://github.com/revanced/revanced-patcher/commit/058d292ad5e297f4c652ff543c13e77a39f7fb1b))
|
||||||
|
|
||||||
## [6.4.2](https://github.com/revanced/revanced-patcher/compare/v6.4.1...v6.4.2) (2023-01-17)
|
## [6.4.2](https://github.com/revanced/revanced-patcher/compare/v6.4.1...v6.4.2) (2023-01-17)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
kotlin.code.style = official
|
kotlin.code.style = official
|
||||||
version = 6.4.2
|
version = 6.4.3-dev.1
|
||||||
|
@ -101,7 +101,7 @@ fun MutableMethod.removeInstruction(index: Int) = this.implementation!!.removeIn
|
|||||||
fun MutableMethod.label(index: Int) = this.implementation!!.newLabelForIndex(index)
|
fun MutableMethod.label(index: Int) = this.implementation!!.newLabelForIndex(index)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the instruction at given index in the method's implementation.
|
* Get the instruction at the given index in the method's implementation.
|
||||||
* @param index The index to get the instruction at.
|
* @param index The index to get the instruction at.
|
||||||
* @return The instruction.
|
* @return The instruction.
|
||||||
*/
|
*/
|
||||||
@ -228,20 +228,3 @@ internal fun parametersEqual(
|
|||||||
internal val nullOutputStream = object : OutputStream() {
|
internal val nullOutputStream = object : OutputStream() {
|
||||||
override fun write(b: Int) {}
|
override fun write(b: Int) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Should be used to parse a list of parameters represented by their first letter,
|
|
||||||
* or in the case of arrays prefixed with an unspecified amount of '[' character.
|
|
||||||
*/
|
|
||||||
internal fun String.parseParameters(): List<String> {
|
|
||||||
val parameters = mutableListOf<String>()
|
|
||||||
var parameter = ""
|
|
||||||
for (char in this.toCharArray()) {
|
|
||||||
parameter += char
|
|
||||||
if (char == '[') continue
|
|
||||||
|
|
||||||
parameters.add(parameter)
|
|
||||||
parameter = ""
|
|
||||||
}
|
|
||||||
return parameters
|
|
||||||
}
|
|
@ -106,7 +106,10 @@ abstract class MethodFingerprint(
|
|||||||
val stringsList = methodFingerprint.strings.toMutableList()
|
val stringsList = methodFingerprint.strings.toMutableList()
|
||||||
|
|
||||||
implementation.instructions.forEachIndexed { instructionIndex, instruction ->
|
implementation.instructions.forEachIndexed { instructionIndex, instruction ->
|
||||||
if (instruction.opcode.ordinal != Opcode.CONST_STRING.ordinal) return@forEachIndexed
|
if (
|
||||||
|
instruction.opcode != Opcode.CONST_STRING &&
|
||||||
|
instruction.opcode != Opcode.CONST_STRING_JUMBO
|
||||||
|
) return@forEachIndexed
|
||||||
|
|
||||||
val string = ((instruction as ReferenceInstruction).reference as StringReference).string
|
val string = ((instruction as ReferenceInstruction).reference as StringReference).string
|
||||||
val index = stringsList.indexOfFirst(string::contains)
|
val index = stringsList.indexOfFirst(string::contains)
|
||||||
@ -244,7 +247,7 @@ data class MethodFingerprintResult(
|
|||||||
* The result of scanning strings on the [MethodFingerprint].
|
* The result of scanning strings on the [MethodFingerprint].
|
||||||
* @param matches The list of strings that were matched.
|
* @param matches The list of strings that were matched.
|
||||||
*/
|
*/
|
||||||
data class StringsScanResult(val matches: List<StringMatch>){
|
data class StringsScanResult(val matches: List<StringMatch>) {
|
||||||
/**
|
/**
|
||||||
* Represents a match for a string at an index.
|
* Represents a match for a string at an index.
|
||||||
* @param string The string that was matched.
|
* @param string The string that was matched.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user