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

Fix failed renaming due to blocking references (exclude from renaming) #385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KvanTTT
Copy link

@KvanTTT KvanTTT commented Jul 25, 2021

Fix #379

@AppVeyorBot
Copy link

Build ConfuserEx 829 completed (commit b4a38a059e by @KvanTTT)

@mkaring
Copy link
Owner

mkaring commented Jul 25, 2021

This is very likely just fixing a symptom and not the actual issue. It relies on the entire structure being in a state that is correctly renamed for the runtime in that state, but this isn't guarantied.
I'm guessing to have to work for sure, would be to revert all the names to the original name, to ensure that everything is still working fine.

From the classes/methods listed in the error message, it's not possible to identify the actual problem? It's very likely related to the inheritance structure in that case.

@KvanTTT
Copy link
Author

KvanTTT commented Aug 1, 2021

I'll try to explore more, but later.

@mkaring
Copy link
Owner

mkaring commented Aug 1, 2021

Consider switching the PR to draft for the time being.

@KvanTTT
Copy link
Author

KvanTTT commented Oct 3, 2021

This is very likely just fixing a symptom and not the actual issue. It relies on the entire structure being in a state that is correctly renamed for the runtime in that state, but this isn't guarantied.

BTW, I think symptoms fixing is better than not fixing them. At least output assembly will work if the first option is applied.

@mkaring
Copy link
Owner

mkaring commented Dec 18, 2021

The thing with this change is, that this is unlikely to work in many cases. The place where the obfuscation is interrupted in this case is at the point where parts of the structure that needs to be renamed as a whole, is already renamed.
Meaning this is likely to still produce an illegal result.

@KvanTTT: Your issue is still present after #425 has been merged?

@KvanTTT
Copy link
Author

KvanTTT commented Dec 18, 2021

Unfortunately not. The same error that I've already described.

@mkaring
Copy link
Owner

mkaring commented Dec 18, 2021

The property not being renamed anymore is the expected result of the change. The fact that you are still seeing an error, points to some part of the inheritance structure still being renamed.
Any chance you could check the other types that are part of the inheritance and see if any property is still being renamed? For ease of searching you should be able to produce the same issue with the debug rename mode.

@KvanTTT
Copy link
Author

KvanTTT commented Dec 19, 2021

Thank you for pointing out at debug renaming mode. Anyway, I still can not reproduce the issue. But I've noticed a prefix in erroneous property that I can not achieve in a test sample. I mean BaseHandler::Logger instead of just Logger in the correct program. Yes, it looks like it should not be renamed.

Also, I've noticed there is something strange with invalid metadata protection. There are different errors in invalid metadata protection turned on/off and renaming with renPublic=true is used.

@mkaring
Copy link
Owner

mkaring commented Dec 19, 2021

When you say you "can't reproduce it". You mean that you can't extract an minimal example to show the issue or that you can't reproduce the issue anymore in your production code? Bit confused about this one 😉

@KvanTTT
Copy link
Author

KvanTTT commented Dec 20, 2021

The first one, extract a minimal example. Sure I can reproduce it on production since the exception exists 😊

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