DEV Community

Cover image for Anubis - Python Obfuscator
0sir1ss
0sir1ss

Posted on β€’ Edited on

10 5

Anubis - Python Obfuscator

Project on github here

🎯 About

I was looking around online and github when I realised that there were little Python obfuscators. First there's pyarmor but that can be deobfuscated, however it still is quite good. Then there's many tools like pyminifier but they all do the same thing and don't provide any real protection against your code. Another good solution I found was this obfuscator here but purchasing it costs USD $1998. Luckily I made my own version named Carbon which you can use for free.

Anyways, I decided to create my own obfuscator, which provides a plethora of features such as junk code and custom encryption, and includes the obfuscation found in Carbon.

You can see the difference it makes from this source here to this obfuscated one liner here and you can see what Carbon does here

✨ Features

βœ”οΈ Anti Debugger - Stop the use of debuggers whilst this program is running
βœ”οΈ Junk Code - Add junk code to the program
βœ”οΈ Carbon Obfuscation - Rename classes, functions, variables and parameters along with removing comments and docstrings
βœ”οΈ Custom Encryption - A one liner which uses custom encryption
βœ”οΈ Compile to exe with Nuitka

πŸš€ Technologies

The following tools were used in this project:

βœ… Requirements

Before starting, you need to have Python installed.

If you wish to compile your project to an exe you will need Nuitka along with a C compiler. Nuitka will automatically download the MinGW64 compiler if no usable one is found.

🏁 Starting

# Clone this project
$ git clone https://github.com/0sir1ss/Anubis

# Access
$ cd Anubis

# Install dependencies
$ pip install -r requirements.txt

# Run the project
$ python anubis.py
Enter fullscreen mode Exit fullscreen mode

If you do not compile to an exe and instead choose to distribute with the custom encryption you will need the ancrypt file
You can build this with the following command:

python setup.py build_ext --inplace

 

Made with ❀️ by 0sir1s

Neon image

Serverless Postgres in 300ms (❗️)

10 free databases with autoscaling, scale-to-zero, and read replicas. Start building without infrastructure headaches. No credit card needed.

Try for Free β†’

Top comments (0)

Jetbrains image

Build Secure, Ship Fast

Discover best practices to secure CI/CD without slowing down your pipeline.

Read more

πŸ‘‹ Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay