Skip to content
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

Counter test inconsistencies #6

Open
terminalsin opened this issue Aug 6, 2023 · 3 comments
Open

Counter test inconsistencies #6

terminalsin opened this issue Aug 6, 2023 · 3 comments

Comments

@terminalsin
Copy link

Issue
The counter test is not accurate.

Reasoning
Most higher end obfuscators add transient or cached fields. This is inconsistent with the test's logic. Instead, the test should check if the cached reflection fields are transient or synthetic to ensure these don't get added to serialization logic and so forth. Furthermore, the order of fields should be checked as any change in order will cause breaking changes in reflections. Order should be maintained.

@huzpsb
Copy link
Owner

huzpsb commented Aug 6, 2023

Thank you for pointing that out! Well, this test is made because I am a Minecraft dev. When making a packet-interpreting plugin, say a packet-based anti-cheat, there can be classes to be serialized while having no flags.
It's should be noted that while this repo is intended to work as a general bench, you may add configs to the obfuscator when making a demo for the provided jar.
As for the orders, you do have a good point. I will fix that in a further version.

@terminalsin
Copy link
Author

Thank you for pointing that out! Well, this test is made because I am a Minecraft dev. When making a packet-interpreting plugin, say a packet-based anti-cheat, there can be classes to be serialized while having no flags. It's should be noted that while this repo is intended to work as a general bench, you may add configs to the obfuscator when making a demo for the provided jar. As for the orders, you do have a good point. I will fix that in a further version.

Oh yeah I've done anticheats. I know what you mean. The transient and synthetic flags should be sufficient. For example, GSON skips any transient field, making it compatible with 99% of serialization libs.

@huzpsb
Copy link
Owner

huzpsb commented Aug 6, 2023

Kinda beyond my knowledge D:
Would appreciate if you make a PR for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants