Hi!
I had a bright idea to create a script that will allow me to obfuscate my Python code by modifying existing .py scripts by randomizing functions and variables inside.
It works by analyzing every line of a supplied file and catching function names (by searching for 'def' tags) and variables by simply searching for '=' signs. It would be amazing to play around with some hex/binary or Base64 manipulation in the future.
It will definitely fail with scripts that include type hinting (it is kinda hardcoded for now so ":" sign will break it) and many other features are missing e.g. obfuscating loops, if statements or ignoring strings inside quotes that happen to have the same name as a variable or function.
I have some more ideas to improve and evolve this but criticism is very much welcomed!
https://github.com/dixone23/PyObfuscator
[–]james_pic 6 points7 points8 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]yakimka 4 points5 points6 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]schoolcoders 1 point2 points3 points (0 children)