JSong
JSong

Reputation: 360

A python script to rename variables of given python source code with a set of given words

I want to change variable (and method) names of a given python code with a set of given words. (If someone is familiar with ProGuard for Android, this will be very similar to that.) For example, I want to do something like below:

python renamer.py --input ./some-source.py --wordlist ./nice_words.txt

I took a look of rope (python library) and other obfuscation tools. But I could not find what I wanted. What will be a good way to do what I want to do?

Upvotes: 0

Views: 777

Answers (1)

JSong
JSong

Reputation: 360

I found the solution. An open source project called Carbon (https://github.com/0sir1ss/Carbon) can be used for this purpose by slightly modifying the code.

Upvotes: 1

Related Questions