Intensio-Obfuscator - Obfuscate A Python Code 2.X As Well As 3.X


Takes a python source code together with transform it into an obfuscated python code, supersede mention of variables - classes - functions to random chars together with defined length, removes comments, line of piece of occupation breaks together with add together to each line of piece of occupation a random script amongst an ever differents values.

Requirement
  • Python >= 3.5

Files supported
  • Files written inwards python 2.x together with 3.x

Installation
git clone https://github.com/Hnfull/Intensio-Obfuscator.git
cd Intensio-Obfuscator/intensio/

Features
Feature Description
Replace Replace all names of variables - classes - functions defined together with withdraw all line of piece of occupation breaks
Padding Add random scripts afterwards each line of piece of occupation together with withdraw all line of piece of occupation breaks
Remove Remove all commentaries together with all line of piece of occupation breaks
Secret Only for the curious :)
Mixer lower Generate words amongst 32 chars that supersede variables - classes - functions defined inwards source code together with inwards random scripts if 'replace' or 'padding' features are specified
Mixer medium Generate words amongst 64 chars that supersede variables - classes - functions defined inwards source code together with inwards random scripts if 'replace' or 'padding' features are specified
Mixer high Generate words amongst 128 chars that supersede variables - classes - functions defined inwards source code together with inwards random scripts if 'replace' or 'padding' features are specified

Usages
-h, --help              -> demo this assist message together with exit. -f, --onefile           -> if alone 1 file. -d, --multiplefiles     -> if multiple files (project). -i, --input             -> source file or directory - if multiple files dot a directory that comprise all your files. -c, --code              -> linguistic communication used inwards input file or directory. value: [python] -o, --output            -> output file or directory that volition endure obfuscated - if multiple file dot a empty directory that volition comprise all your files. -m, --mixer             -> length score of variables mix output. values: [lower,medium,high] -r, --replace           -> activate the 'replace' obfuscation feature. -p, --padding           -> activate the 'padding' obfuscation feature. -rm, --remove           -> activate the 'remove' obfuscation f   eature. -s, --secret            -> activate the 'secret' bullshit feature.
  • If y'all desire exclude python variables - classes - functions which volition endure taken past times the 'replace' feature, edit intensio/exclude_python_words.txt
  • If y'all desire to include python variables - classes - functions that are non included when launching the 'replace' feature, edit intensio/include_python_words.txt
Do non define identically your names of local variables - classes - functions to python keywords or names of functions - classes of imported python libraries !!

Examples

Python target file(s):
  • Multiple files basic: python3.x intensio_obfuscator.py -d -i test/python/multiplefiles/basic/input/basicRAT -c python -o test/python/multiplefiles/basic/output/basicRAT -m lower -r -rm
  • Multiple files advanced: python3.x intensio_obfuscator.py -d -i test/python/multiplefiles/advanced/input/basicRAT -c python -o test/python/multiplefiles/advanced/output/basicRAT -m high -r -p -rm
  • If it's 1 file only, the ascendancy is same that for multiple file, only produce non pointed a directory but a python file direct for -i together with -o parameters, hence alter -d parameter into -f parameter

Possible malfunctions
  • If a variable - shape - business office has an identical mention amongst a give-and-take betwixt ' ' or " " inwards print() function, your text volition stimulate got the same value that the mixer variables - shape - function.
  • If a variable - shape - business office has an identical mention amongst a give-and-take inwards afterwards # (commentary) your text volition stimulate got the same value that the mixer variables - shape - function, but if betwixt """ or ''' without a variables before, no replacing is performed.
  • If y'all named your variables - classes - functions inwards the same agency every bit python keywords or names of functions/class of imported python libraries, an mistake may appear. Edit intensio/excluded_python_words.txt to add together the variables non to obfuscate or alter your names of local variables - classes - fuctions, if your variables - classes - functions stimulate got the same mention every bit a keyword it, he volition endure obfuscated together with errors volition appear.

Todo
  • Version 1.0.1-x:
    • Code optimization
    • Fix bugs together with problems
    • Improved features already present
  • Version 1.1.0:
    • Support files written inwards C
  • Version 1.2.0:
    • Support files written inwards C++

Disclamer
  • Intensio-Obfuscator is for education/research purposes only. The writer takes NO responsibleness ay for how y'all select to utilisation whatever of the tools provided