kam800 / MachObfuscator

MachObfuscator is a programming-language-agnostic Mach-O apps obfuscator for Apple platforms.
MIT License
521 stars 78 forks source link

External Frameworks - NSUnknownKeyException #20

Open lukaspetrik opened 5 years ago

lukaspetrik commented 5 years ago

Hi there!

I'm trying to integrate MachObfuscator in our current project, which uses external Pods / Frameworks. Obfuscation works great - using realWords - but application crashes on runtime with NSUnknownKeyException. Seems like obfuscator replaced some of the keys in FireBase.

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ConsiderNightSize 0x2829c82a0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key dataCollectionEnabled.' First throw call stack: (0x2222b1eb8 0x2214abf18 0x2221c7c08 0x222cd0f9c 0x222d2aa88 0x222c414b4 0x100d52c68 0x100d5d868 0x1034578a0 0x103458e38 0x10345be10 0x10346a110 0x10346ab04 0x221eb6bc0 0x221ebcdd4) libc++abi.dylib: terminating with uncaught exception of type NSException

Would be great if MachObfuscator provided more options and args, like Frameworks / types to exclude from obfuscation.

Cheers!

Lukas

kam800 commented 5 years ago

Thanks for reporting the issue. Some people already asked me about this improved blacklisting, so I think it is the high time to implement it. I will try to finish this before the weekend :) Firebase is provided as a static library, so in this specific case the type blacklisting will do the job. Additionally I will provide a mapping file (so the developer could map the ConsiderNightSize back to its original name).