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
Currently, method fingerprints match using exact class match (or more specifically, 'starts with' matching of a class name).
It does not allow polymorphic matching, such as comparing what the class is an instance of.
For example. A target method takes a two obfuscated parameters: private void a(Lfoo;Lbar;)
Currently it is only possible to match this method by specifying a signature with 2 parameters of any kind of objects:
So the method signature should allow specifying an 'instance of' like comparison. Perhaps this can be done by specifying a prefix to the class name: parameters = listOf("instanceof:Ljava/lang/Enum;", "instanceof:Ljava/util/map;")
This same logic could be used for the return type as well: returnType = "instanceof:Ljava/util/list;"
Feature
add polymorphic matching to method signatures.
Motivation
Allow better signature matching
Additional context
No response
Acknowledgements
I have searched the existing issues and this is a new and no duplicate or related to another open issue.
I have written a short but informative title.
I filled out all of the requested information in this issue properly.
The text was updated successfully, but these errors were encountered:
This is a limitation of the underlying library. At first, the class would have to be found, and then super classes would have to be checked for; this can significantly increase resolution times.
The class implementation lookup would be done once when the patcher starts, so any performance cost would be paid just once and is not affected by how many patches are used.
I suppose that since opcodes are usually needed to be matched, having this much fine grained control may not matter.
I believe fine grained control is much better done in customFingerprint. Currently you have access to the current class and method that is being tried to resolve the fingerprint on. This can be adjusted in any shape so that for example access to all classes is present.
Type
Functionality
Issue
Currently, method fingerprints match using exact class match (or more specifically, 'starts with' matching of a class name).
It does not allow polymorphic matching, such as comparing what the class is an instance of.
For example. A target method takes a two obfuscated parameters:
private void a(Lfoo;Lbar;)
Currently it is only possible to match this method by specifying a signature with 2 parameters of any kind of objects:
But looking a these classes we see that:
So the method signature should allow specifying an 'instance of' like comparison. Perhaps this can be done by specifying a prefix to the class name:
parameters = listOf("instanceof:Ljava/lang/Enum;", "instanceof:Ljava/util/map;")
This same logic could be used for the return type as well:
returnType = "instanceof:Ljava/util/list;"
Feature
add polymorphic matching to method signatures.
Motivation
Allow better signature matching
Additional context
No response
Acknowledgements
The text was updated successfully, but these errors were encountered: