OBFUSCATION - A very important part of closed source programming!
That helps in security of apps, websites,softwares, etc.
We'll mention about obfuscating code of different languages, if we're missing something, that you were expecting, tell in comments, I'll add that one!
But first of all,what is obfuscation?
Dictionary meaning of obfuscation is , the action of making something obscure, unclear, or unintelligible. It's so similar in programming too, so in programming,
It's simply conversion of a code in a computer language into some secret unreadable, non-understandable code! That could be understood by only compiler or the machine you are running on!
Why obfuscation?
It's too easy to decompile C# or Java code, and it could allow goons to read all the code of a program, and then he/she may copy it or even harm the organization!
So, most of languages have a compiler that converts your raw code into Byte Code , that either converts it into non-readable words or makes variable of your code that will make it too difficult to figure out the real code.
Here are some examples of
Obfuscated Codes:
Python Byte Code:
Java Obfuscated Code:
C-Sharp Obfuscated Code:
That helps in security of apps, websites,softwares, etc.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoblyVMAQmutxdHCwrTChUvo6O4bI6r774fWqHib0Ep-iFT6B4SxkiVZ97hgi-KHcOx0B8hYSqW_3p9h1y0kZ5Q6ypxqI7zJqJauAIDJQgRLGCVuhcvcc_G7hrARMRTAeyZ6ZlItKTCcFC/s320/images.png)
We'll mention about obfuscating code of different languages, if we're missing something, that you were expecting, tell in comments, I'll add that one!
But first of all,what is obfuscation?
Dictionary meaning of obfuscation is , the action of making something obscure, unclear, or unintelligible. It's so similar in programming too, so in programming,
It's simply conversion of a code in a computer language into some secret unreadable, non-understandable code! That could be understood by only compiler or the machine you are running on!
Why obfuscation?
It's too easy to decompile C# or Java code, and it could allow goons to read all the code of a program, and then he/she may copy it or even harm the organization!
So, most of languages have a compiler that converts your raw code into Byte Code , that either converts it into non-readable words or makes variable of your code that will make it too difficult to figure out the real code.
Here are some examples of
Obfuscated Codes:
Python Byte Code:
C-Sharp Obfuscated Code:
So, by seeing these examples, you might have understood how a obfuscated code looks like!
If you want to see more examples, just get a compiled program (like .exe or .pyc)
And open it with a Text-Editor , you will see another byte code, or say obfuscated code.
Where to use obfuscation?
You can use obfuscation in your closed-source program or project.
Now most important part, How to obfuscate?
I'll try to include obfuscation of commonly used languages, if I'm missing something, that you were expecting, tell in comments, I'll add that one!
C -
C is one of most old and basic language, it's mother of all languages, so how it could be ignored.
You can obfuscate C code by using CShroud.
Java-
It's not here because it's used on 3 Billion devices, I randomly chose it, so don't worry about those 3 Billion Devices.
There are too many good obfuscating tools for Java, I've listed some of them:
With link to their download page...
1: JavaGuard
2: JODE - It also performs some other tasks like removing dead non-working code lines!
3: ProGuard
Python-
Yes, your one of favourite language (probably) have obfuscator, that converts it to Python Bite Code, it has .pyc or .pyo extension.
Python is easy-to-read and understand language, so it can't be made so obsecure, like other languages could be, but it obsecures till some extent.
Python has a pre-built compiler that converts code to byte code
Just run following line in your Terminal:
python -OO -m py_compile <your program.py>
It produces a
.pyo
file that contains byte-code, and where docstrings are removed, etc. You can rename the .pyo
file with a .py
extension, and
python <your program.py>
runs like your program but does not contain your source code.
.NET -
Now, .NET, C#.NET , VB.NET , ASP.NET use same intermediate language to compile so following obfuscating tool could be used for all languages which have same intermediate language (compiler) as .NET ...
And it's official website: https://yck1509.github.io/ConfuserEx/
JavaScript -
JavaScripts on a website at front-end are easily visible by clicking View Page Source (in most cases).
And sometimes, JavaScript code might be confidential , so better obfuscate it!
Use JavaScript Obfuscator, available at javascriptobfuscator.com .
They have both online obfuscator and offline as well.
PHP-
There is online PHP Obfuscator available at fopo.com.ar .
Once you submit your code to website, it will be deleted from server after it's obfuscated version is submitted to you!
SO, that's it for this article, I chose these languages, I can't write about all, but if you want me to write about a particular language, tell in comments, I'll write it about ASAP .
Comments
Post a Comment