Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Anybody know if it's easy to reverse engineer or strip parts of the application when deploying PyQt5 apps? Or do you need extra measures to obfuscate the code to protect certain logic?


I've never tried it but given Python's interpreted nature, it is likely pretty easy unless you use an obfuscator. Note that that's true for Java .class files as well. I was really surprised once when I tried to decompile one of my own that I had thought would be safe. You get near-perfect accuracy.


Yeap, it's pretty easy (see: https://github.com/rocky/python-uncompyle6), although note that if you're worried about decompiling, instead of using an obfuscator, using something as Cython or Nuitka to compile your code should not be difficult -- and as a plus your code becomes faster too ;)


If you build the python ecosystem yourself and supply a custom binary, you could probably obfuscate a bit by modifying the compiled bytecode values. Supply only .pyc and maybe modify or not supply the dis module.

Here's a resource that may help: https://devguide.python.org/compiler/#introducing-new-byteco...


This is especially true for Android apk's broken down into .smali files. They can be decompiled and recompiled with ease.

Part of my job used to be the large scale modification and recompilation of Android apps....you'd be amazed how many passwords are floating around in those.



>Note that that's true for Java .class files as well.

Yes. There was a free third-party Java decompiler called JAD some year ago, for example.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: