-
-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow fingerprint matching based on instance of #176
Comments
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. |
In most cases, such specific matching capabilities are not required, |
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: