Giter Club home page Giter Club logo

carbon's Introduction

Carbon

 

[UNMAINTAINED] Carbon

Github top language Github stars License

About   |   Features   |   Technologies   |   Requirements   |   Starting   |   License   |   Author


🎯 About

When looking around for python obfuscators, you might have found some like pyarmor, or pyminifier.
But then there's one that does actually obfuscate the code which can't be reversed to the original source. You can find it here, but there's just one small caveat.
Purchasing it costs USD $1998.

Now that's not to say you can't use it for free, after all if you want to use it online it's free to use. But if you wish to use an offline cli version, well then you need to pay.

This is where Carbon comes in. I decided to make my own version of the oxyry obfuscator which does the same job. It renames classes, functions, parameters and variables. It removes docstrings and comments and doesn't stick on a line number at the end of each line. But best of all, it isn't locked to Python 3.3-3.7.

✨ Features

✔️ Remove docstrings and comments
✔️ Rename classes, functions, parameters and variables

🚀 Technologies

The following tools were used in this project:

✅ Requirements

Before starting, you need to have Python installed.

🏁 Starting

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

# Access
$ cd Carbon

# Run the project
$ python carbon.py

📝 License

This project is under license from MIT. For more details, see the LICENSE file.

Made with ❤️ by 0sir1s

 

Back to top

carbon's People

Contributors

0sir1ss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

carbon's Issues

Probably not safe against LLM de-obfuscating

Seems like language models do a really decent job in de-obfuscating the generated code (same holds for other obfuscating tools, not Carbon in particular). Didn't test it in all any depth, but GPT-3.5 give great hints when fead with a function from the example folder: https://chat.openai.com/share/0dd8d626-4de1-4de4-af79-d9acbd66c7b5

So, be careful when you use it against important stuff. If larger code bases are used, at least for now, the limited context length of LLMs may give a bit of protection.

Improperly renames function parameters

We have the original code here:

def add(x: int, y: int) -> None: print(f"{x:,} + {y:,} = {(x+y):,}") add(10, 10)

after obfuscation

`
def lIIlllIIIlIllI(llIIlllIllIl: int, IllIIIlIllIl: int) -> None:
print(f"{x:,} + {y:,} = {(llIIlllIllIl+IllIIIlIllIl):,}")
lIIlllIIIlIllI(10, 10)

`

Replacing names

Names in strings or default parameter values are also replaced.
e.g.
def func(arg1="arg1"):
print("arg1 is", arg1)
will be replaced with
def func(llIlIIllIIIlIllll='llIlIIllIIIlIllll'):
print("llIlIIllIIIlIllll is", llIlIIllIIIlIllll)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.