Python code obfuscator: Intensio obfuscator

Time:2021-1-13

Introduction to tools

Intensio obfuscator can directly convert Python source code and output Python code after obfuscation. It will automatically replace variable names, class names, and function names with random characters, define the length, remove comments, wrap lines automatically, and add random scripts to each line of code (all random values are different).

Tool operation requirements

Python version>=v3.5

Document support

Currently, the python file code versions supported by Intensio obfuscator are v2. X and v3. X

Tool installation

Users can directly use git command to clone project code from GitHub code base to local

$ git clone https://github.com/Hnfull/Intensio-Obfuscator.git
$ python3 -m pip install -r Intensio-Obfuscator/requirements.txt
$ cd Intensio-Obfuscator/src/intensio_obfuscator
$ python3 intensio_obfuscator.py --help

Function introduction

Replace: replace all variable names, class names, and function names, and remove all line breaks

Fill: add a random script after each line of code and remove all line breaks

Remove: remove all comments and line breaks from the code

Low level confusion: generate 32 character random string, replace the variable name, class name and function name defined in the source code

Intermediate confusion: generate a 64 character random string, replace the variable name, class name and function name defined in the source code

Advanced confusion: generate 128 character random string, replace the variable name, class name and function name defined in the source code

Tool use

parameter explain
-h,–help Display this help message and exit
-i, –input Source directory – indicates the directory that contains your files
-o, –output Output directory will be confused – indicates an empty directory that will contain files
-mlen,–mixerlength Defines the length of the generated random string[lower:32
-ind,–indent Indicates the indentation of Python source code. Possible values:[2
-rts,-replacetostr Enablereplace string to string mixedConfusion function
–excludewords File to exclude specific words (see the format in the documentation) for-rts, --replacetostrConfusion function
-ps,-paddingscript Enablepadding scriptConfusion function
-rfn,–replacefilename Enablereplace file nameConfusion function
–excludefiles File to exclude file names (see the format in the documentation) for-rfn, --replacefilenameConfusion function
-rth,–replacetohex Enablereplace string to hexconfusion(python files 2 only)
–version Check current version
-v,–verbose Improve the level of detail
intensio_obfuscator -i /Users/nzoe/PycharmProjects/ -o /Users/nzoe/PycharmProjects/test -mlen lower -rts -ps  -rth -ind 2

If you want to exclude some variable names, class names or function names when using the replace function, you can edit the following file:

intensio/exclude_python_words.txt

This work adoptsCC agreementReprint must indicate the author and the link of this article


You’re far from it!

Recommended Today

Experiment of mongodb adding, deleting, checking and modifying database

Mongodb database experiment 1: Add data Operation 1: single insert: insert the user dataset in yelp database and the data required below _ ID: defined as your own class; user_ ID: own student number + any character (more than 22 characters take the first 22 digits, less than 22 characters add letters, numbers or underscores); […]