/Intensio-Obfuscator

Obfuscate a python code 2.x and 3.x

Primary LanguagePythonMIT LicenseMIT

Intensio-Obfuscator (Beta)

What is this ?

  • Intensio-Obfsucator tool takes a python source code and transform it into an obfuscated python code
    • Replace all names of variables/classes/functions/files-name to random strings with length defined and all chars to their hexadecimal value
    • Delete all comments, all spaces lines
    • Padding random scripts with an always differents values

Requirements

  • Python >= 3.5
  • requirements.txt

Files supported

  • Files written in python 2.x and 3.x

Installation

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

pip3 install -r Intensio-Obfuscator/requirements.txt

cd Intensio-Obfuscator/intensio/

python3.x intensio_obfuscator.py --help

Features

Features Descriptions
delete comment Delete all comments (this feature is executed by default)
delete space line Delete all spaces line (this feature is executed by default)
correction padding empty class/function Add padding to empty classes and functions, if the class or function contains only comments, the default feature delete comments will leave a class or function empty, this will avoid generating an error (this feature is executed by default)
replace string to string mixed Replace all names of variables/classes/functions to random strings with length defined
padding script Add padding of random scripts after each line
replace file name Replace all files name to random strings with length defined
replace string to hex Replace all chars to their hexadecimal value
correction delete pyc file delete all pyc file in output directory (this feature is executed by default)
mixerlevel lower Generate random strings of 32 chars when -rts, --replacetostr or -ps, --paddingscripts or -rfn, --replacefilesname or -rth, --replacetohex parameters are specified
mixerlevel medium Generate random strings of 64 chars when -rts, --replacetostr or -ps, --paddingscripts or -rfn, --replacefilesname or -rth, --replacetohex parameters are specified
mixerlevel high Generate random strings of 128 chars when -rts, --replacetostr or -ps, --paddingscripts or -rfn, --replacefilesname or -rth, --replacetohex parameters are specified
  • Features can be executed separatly
    • replace string to string mixed -> -rts, --replacetostr
    • padding script -> -ps, --paddingscript
    • replace file name -> -rfn, --replacefilename
    • replace string to hex -> -rth, --replacetohex

Usages

Parameters Descriptions
-h, --help show this help message and exit
-i, --input source directory - indicate a directory that contain your file
-o, --output output directory that will be obfuscated - indicate a empty directory that will contain your file
-m, --mixerlevel generate random strings of [ lower:32 | medium:64 | high:128 ] chars when --replacetostr or --paddingscripts or --replacetohex features are specified, default value: [medium], possible values: [lower - medium - high]
-rts, --replacetostr activate the replace string to string mixed obfuscation feature
-ps, --paddingscript activate the padding script obfuscation feature
-rfn, --replacefilename activate the replace file name obfuscation feature
-rth, --replacetohex activate the replace string to hex obfuscation feature
-v, --verbose improve verbosity

Obfuscation examples

Todo

  • Next Version 1.0.8:

    • Optimisation of 'Replace string to string' feature allowing to reduce considerably time to obfuscate code
  • Version 1.0.1-x:

    • Code optimization
    • Fix issues
    • Improved features already present
  • Version 1.1.0-x:

    • Stable version

License

  • MIT

Contact

Disclamer

  • Intensio-Obfuscator is for education/research purposes only. The author takes NO responsibility ay for how you choose to use any of the tools provided