Advance Code Obfuscator

๐Ÿ›ก๏ธ Obfuscate Your Code Across Multiple Programming Languages

The Advanced Code Obfuscator is a powerful tool designed for developers and security professionals to obscure source code, making it difficult to reverse-engineer or analyze. It supports Python, C++, and C#, and incorporates advanced features such as variable name randomization, string encryption, and comment removal.

adv code obfs

๐Ÿš€ Features

  • Multi-Language Support: Obfuscate Python, C++, and C# source code.
  • Variable Name Obfuscation: Automatically replace variable names with randomized strings.
  • String Encryption: Convert string literals into encrypted formats (e.g., hex, Base64).
  • Comment Removal: Strip all comments from the code to reduce readability.
  • Customizable Options: Enable or disable specific features (e.g., string encryption, variable obfuscation).
  • Reserved Keyword Handling: Ensure language-specific keywords remain unaffected.
  • Cross-Platform Compatibility: Works on Windows, macOS, and Linux.

๐Ÿ› ๏ธ Installation

  1. Clone the Repository:
   git clone https://github.com/yourusername/Advanced-Code-Obfuscator.git
   cd Advanced-Code-Obfuscator
  1. Install Dependencies:
    Ensure Python 3.6+ is installed. Install additional dependencies using:
   pip install -r requirements.txt
  1. Run the Tool:
   python code_obfuscator.py --help

๐Ÿ“‹ Usage

Basic Command

python code_obfuscator.py -i <input_file> -o <output_file> -l <language> [options]

Options

FlagDescription
-i, --inputInput file to obfuscate (required).
-o, --outputOutput file to save the obfuscated code (required).
-l, --languageProgramming language of the input file (python, c++, c#).
--no-varDisable variable name obfuscation (default: enabled).
--no-stringsDisable string encryption (default: enabled).
--no-commentsDisable comment removal (default: enabled).

Examples

1. Obfuscate a Python file:

python code_obfuscator.py -i script.py -o obfuscated_script.py -l python

2. Obfuscate a C++ file with string encryption disabled:

python code_obfuscator.py -i code.cpp -o obfuscated_code.cpp -l c++ --no-strings

3. Obfuscate a C# file while retaining comments:

python code_obfuscator.py -i program.cs -o obfuscated_program.cs -l c# --no-comments

๐Ÿ“œ Advanced Features

1. String Encryption

  • Converts all string literals into an encrypted format.
  • Default: Hexadecimal encoding.
  • Planned Enhancement: Add AES encryption for additional security.

2. Variable Name Obfuscation

  • Replaces variable names with random strings.
  • Avoids reserved keywords and retains syntax integrity.

3. Comment Removal

  • Removes all single-line (#, //) and multi-line (/* */) comments to reduce readability.

๐ŸŒŸ Supported Languages

LanguageFeatures SupportedNotes
PythonVariables, Strings, CommentsCompatible with Python 3.6+
C++Variables, Strings, CommentsHandles standard and STL-based syntax
C#Variables, Strings, CommentsSupports modern C# syntax (up to C# 9.0)

๐Ÿ” Example

Input (example.py):

# This is a simple Python script
def greet_user(name):
    print(f"Hello, {name}!")  # Print greeting

greet_user("Alice")

Output (obfuscated_example.py):

def RkYuiToxPz(name):
    print("\x48\x65\x6c\x6c\x6f\x2c\x20" + name + "\x21")

RkYuiToxPz("\x41\x6c\x69\x63\x65")

๐Ÿ›ก๏ธ Roadmap

  • [ ] Add support for JavaScript and Java.
  • [ ] Introduce AES encryption for strings.
  • [ ] Add syntax validation to prevent invalid output.
  • [ ] Provide a web-based interface for ease of use.

๐Ÿค Get in on GitHub

https://github.com/genxcyber/Advanced-Code-Obfuscator


0 0 votes
Article Rating
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments