All Projects → pH-7 → Obfuscator Class

pH-7 / Obfuscator Class

Licence: mit
👨‍💻 Simple and effective Obfuscator PHP class (this is not a stupid base64 encoding script, but a real and effective obfuscation script)

Projects that are alternatives of or similar to Obfuscator Class

Enigma
Gradle Plugin - Obfuscator String Encryption (Android/Java)
Stars: ✭ 43 (-78.71%)
Mutual labels:  encryption, obfuscation, obfuscator
Z00bfuscator
Z00bfuscator is the simple, open-source, cross-platform obfuscator for .NET Assemblies built on .NET Core
Stars: ✭ 35 (-82.67%)
Mutual labels:  obfuscation, obfuscator
Yakpro Po
YAK Pro - Php Obfuscator
Stars: ✭ 678 (+235.64%)
Mutual labels:  obfuscation, obfuscator
Kylin Llvm Obfuscator
based on llvm 5.0.1 release with ollvm
Stars: ✭ 37 (-81.68%)
Mutual labels:  obfuscation, obfuscator
SharpLoader
🔮 [C#] Source code randomizer and compiler
Stars: ✭ 36 (-82.18%)
Mutual labels:  encryption, obfuscator
Sharpyshell
SharPyShell - tiny and obfuscated ASP.NET webshell for C# web applications
Stars: ✭ 402 (+99.01%)
Mutual labels:  encryption, obfuscation
Javascript Obfuscator
A powerful obfuscator for JavaScript and Node.js
Stars: ✭ 8,204 (+3961.39%)
Mutual labels:  obfuscation, obfuscator
Modphuserex
A .NET protector supporting .NET Core forked from the discontinued ConfuserEx
Stars: ✭ 116 (-42.57%)
Mutual labels:  encryption, obfuscator
Deoptfuscator
Deobfuscator for Android Application
Stars: ✭ 115 (-43.07%)
Mutual labels:  obfuscation, obfuscator
Skater .net Obfuscator
Skater .NET Obfuscator is an obfuscation tool for .NET code protection. It implements all known software protection techniques and obfuscation algorithms.
Stars: ✭ 64 (-68.32%)
Mutual labels:  obfuscation, obfuscator
sus
A now actually pretty good amogus themed javascript obfuscator lol
Stars: ✭ 23 (-88.61%)
Mutual labels:  obfuscation, obfuscator
Androidlibrary
Android library to reveal or obfuscate strings and assets at runtime
Stars: ✭ 162 (-19.8%)
Mutual labels:  encryption, obfuscation
UniObfuscator
Java obfuscator that hides code in comment tags and Unicode garbage by making use of Java's Unicode escapes.
Stars: ✭ 40 (-80.2%)
Mutual labels:  obfuscation, obfuscator
Mjcodeobfuscation
一个用于代码混淆和字符串加密的Mac小Demo
Stars: ✭ 445 (+120.3%)
Mutual labels:  obfuscation, obfuscator
idy
👓 An ID obfuscator for ActiveRecord
Stars: ✭ 15 (-92.57%)
Mutual labels:  obfuscation, obfuscator
ConfuserEx-Mod-By-Bed
Beds Protector | Best free obfuscation out right now
Stars: ✭ 297 (+47.03%)
Mutual labels:  obfuscation, obfuscator
data obfuscation
Data Obfuscation for C/C++ Code Based on Residue Number Coding (RNC)
Stars: ✭ 15 (-92.57%)
Mutual labels:  obfuscation, obfuscator
obfuscator
Obfuscate PHP source files with basic XOR encryption in userland code at runtime.
Stars: ✭ 20 (-90.1%)
Mutual labels:  obfuscation, obfuscator
Obfuscar
Open source obfuscation tool for .NET assemblies
Stars: ✭ 1,040 (+414.85%)
Mutual labels:  obfuscation, obfuscator
Yguard
The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts
Stars: ✭ 130 (-35.64%)
Mutual labels:  obfuscation, obfuscator

🔐 PHP Obfuscator

Simple, easy-to-use and effective Obfuscator PHP class.

Not just a stupid base64 encoding script, but a real and effective obfuscation script).

Ideal to obfuscate some critical pieces of your software such as licensing verification functions.

👓 Overview

If you want to keep your open source code private, but working on all Web hosting, this Obfuscator class is THE obfuscator you need!

Not easily readable by developers (unless they are ready to spend lot of time). It will definitely discourage them! 😃

📓 Usage

Take out <php before to obfuscate

First of all, please make sure to strip the PHP open/close tags <?php and ?>

If you specify code to be obfuscated with <?php, you will get a critical syntax error.

Example 1

<?php
require 'src/Obfuscator.php';

$sData = <<<'DATA'
    echo 'This is my PHP code, can be class class, interface, trait, etc. in PHP 5, 7, 7.2, 7.4 and higher.';
DATA;

$sObfusationData = new Obfuscator($sData, 'Class/Code NAME');
file_put_contents('my_obfuscated_data.php', '<?php ' . "\r\n" . $sObfusationData);

Run the my_obfuscated_data.php freshly created, and you will see:

This is my PHP code, can be class class, interface, trait, etc. in PHP 5, 7, 7.2, 7.4 and higher.

If you open the file, you will see that your code is totally hidden (obfuscated).

Example 2

<?php
require 'src/Obfuscator.php';

$sData = <<<'DATA'
    $hour = date('H');

    echo 'The hour (of the server) is ' . date('H:m');
    echo ', and will give the following message:<br><br>';

    if ($hour < 10) {
        echo 'Have a good morning!';
    } elseif ($hour < 20) {
        echo 'Have a good day!';
    } else {
        echo 'Have a good night! zZz z';
    }
DATA;

$sObfusationData = new Obfuscator($sData, 'Give a name to the piece of code you want to obfuscate');
file_put_contents('obfuscated_code.php', '<?php ' . "\r\n" . $sObfusationData);

Run obfuscated_code.php file and you will see something like below:

The hour (of the server) is 19, and will give the following message: Have a good day!

Example 3

<?php
require 'src/Obfuscator.php';

$filename = 'myphpfile'; // A PHP filename (without .php) that you want to obfuscate

$sData = file_get_contents($filename . '.php');
$sData = str_replace(array('<?php', '<?', '?>'), '', $sData); // We strip the open/close PHP tags
$sObfusationData = new Obfuscator($sData, 'Class/Code NAME');
file_put_contents($filename . '_obfuscated.php', '<?php ' . "\r\n" . $sObfusationData);

⚙ Requirement

  • PHP 5.3 or higher (works also with PHP 7.2, ..., 7.4, and beyond!)

📖 History

I began to create this obfuscation tool in early 2014 for my own needs, especially for pH7CMSPro that had a licensing file which was unlocking some premium features if a valid license key was purchased by a client. In summer 2016, the Pro version of pH7CMS was discontinued, and realize there was no reason to keep this project private and I wanted to share it with others (hoping it will help them and save their time!).

Feel free to add your improvements in it by forking the repo and creating a new PR. I will be pleased to review your contribution!

FYI, in 3 years' time, I never found my obfuscated code unobfuscated (and the software was downloaded by over 50,000 users). You can be quite confident then.

🤔 Who Am I?

I'm Pierre-Henry Soria, Software Developer, love learning new things every single day and also passionate about e-businesses and e-marketing.

@phenrysay

📧 Wanna Contact Me?

You can email me at: pierrehenrysoria+github [[AT]] gmail [[D0T]] com 🤗

⚖️ License

Generously distributed under MIT License. See LICENSE.txt file for further information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].