Giter VIP home page Giter VIP logo

Comments (8)

pk-fr avatar pk-fr commented on August 23, 2024

Hi Tobias,

Thanks for your comments…
If you like my project, please star it on github and if you own a blog, or are a regular member of a forum, please let others know it.

First, I will tell you why I wrote this obfuscator.
I am developing a new kind of CMS, and for giving it to test to some people, I was using ZendGuard ( IonCube like).
I spent more than 3000€ to get a perpetual license…. That is not so perpetual (see: http://forums.zend.com/viewtopic.php?f=57&t=110718&start=50)
So I decided to write my own tool.

yakpro-po has been developed under linux, and uses the PHP Parser from nikic to analyse php.
To make it short, there are 3 main steps to obfuscate a single file :

  1. PHP Parser takes the source code as input and generates an abstract syntax tree.
  2. yakpro-po makes changes to this abstract syntax tree, according to your config file.
  3. The modified abstract syntax tree, when converted back to source code gives you the obfuscated source.

For answering your first question, PHP Parser checks the syntax of your source code and emits an error during the obfuscation process.

The generated obfuscated code is also syntax error free.

However, if you use yakpro-po to obfuscate a piece of code that you do not obfuscate along with the whole project.
(I think that you do not obfuscate wordpress)

You must modify your local copy of the yakpro-po.cnf config file to specify all the elements (variables, classes, functions, constants, etc.) that you share between your plugin and wordpress in the according $conf->t_ignore_xxx and $conf->t_ignore_xxx_prefix configuration properties.
For example, if all wordpress functions start with wp_ you can specify : $conf->t_ignore_functions = array(‘wp_’);
These configuration parameters are not available on the mini-demo site.

You also have to ignore all functions, variable that you access indirectly.

Be aware that yakpro-po has been developed for obfuscating entire projects of pure php sources.
It may work (or not) when you embed php within html, or use multiple with html between them.
My personal advice is not to obfuscate such php or at least try disabling statement shuffling.

There is no problem for embedding html into the php code using the heredoc syntax (echo <<<END ... END; )

For my own debugging, (mainly to find which element I did forget to ignore), I use a combination of the following parameters:

yakpro-po --no-strip-indentation --no-shuffle-statements --no-obfuscate-string-literal

If I have to do further more investigation by dumping the syntax tree I use the –debug parameter.

from yakpro-po.

Tobias-Conrad avatar Tobias-Conrad commented on August 23, 2024

cool.
At the moment i use ioncube. create coded files with the online coder for les than 6$ a plugin.
there is no time limit. but i set a version limit and a domain limit.
so i can set when a version is old, or not working without updating.

I do not code i am not into php, ...
But i know good solutions and have dreams and ideas.

in my plugins i have these line i want to hide:
var $activeLicense = null;
var $trialPeriod = null;
if (!is_null($this->trialPeriod)) {
if (is_null($this->activeLicense)) {
$this->trialPeriod = null;
How can i do it with your online tool?

Would it be possible to upload a plugin/ zip file with php files to bulk code to have the same functions, ...?
IDEA: You make a Software as Service out of your online tool. Charge per line of code 0,001 €.
Do a testing mode (8 hours) to see if the files are working with the settings.
Handle also variables in html files coming with the php files. Just like Ioncube does.
Write your name and Link in every file.

from yakpro-po.

pk-fr avatar pk-fr commented on August 23, 2024

Hi Tobias,

Thanks for your comments…
If you like my project, please star it on github and if you own a blog, or are a regular member of a forum, please let others know it.

If you obfuscate just a few lines of code, it will be not so much hard to do reverse engineering.
When the sensitive lines of code are among many others and you obfuscate all of them, it will be quite impossible to figure out what they are.
So it is not a good idea to obfuscate only some piece of code.

However, yakpro-po has been developed to obfuscate a whole project.
As an example, my mini-demo site has been built with the obfuscated version of my personal CMS, which consists of more than 100 000 lines of php code.
And you can see that it works ok with no known bugs.

Concerning your idea to make money through a "Software as a Service" model, I do not know how many people will be ok to pay something to run the program on a web site, posting the source code they want to protect to a third party, when it is free for them to run it on their own machines ....

Stay in touch...
I am currently thinking about a way to make it easier for plugin writers to obfuscate their code, with specific config parameters.
When it is ok, I will make it available on the demo site.

from yakpro-po.

Tobias-Conrad avatar Tobias-Conrad commented on August 23, 2024

hi,

This are the only lines i could Not hide with your Online Tool.
The Rest will be hiden.

Please enable Option to hide them.

----- Reply message -----
Von: "Pascal KISSIAN" [email protected]
An: "pk-fr/yakpro-po" [email protected]
Cc: "Tobias Conrad" [email protected]
Betreff: [yakpro-po] obfuscating and how to proof if the code is 100% running (#3)
Datum: Mi., Nov. 11, 2015 17:35

Hi Tobias,

Thanks for your comments…

If you like my project, please star it on github and if you own a blog, or are a regular member of a forum, please let others know it.

If you obfuscate just a few lines of code, it will be not so much hard to do reverse engineering.

When the sensitive lines of code are among many others and you obfuscate all of them, it will be quite impossible to figure out what they are.

So it is not a good idea to obfuscate only some piece of code.

However, yakpro-po has been developed to obfuscate a whole project.

As an example, my mini-demo site has been built with the obfuscated version of my personal CMS, which consists of more than 100 000 lines of php code.

And you can see that it works ok with no known bugs.

Concerning your idea to make money through a "Software as a Service" model, I do not know how many people will be ok to pay something to run the program on a web site, posting the source code they want to protect to a third party, when it is free for them to run it on their own machines ....

Stay in touch...

I am currently thinking about a way to make it easier for plugin writers to obfuscate their code, with specific config parameters.

When it is ok, I will make it available to the demo site.


Reply to this email directly or view it on GitHub.

from yakpro-po.

pk-fr avatar pk-fr commented on August 23, 2024

Hi

I do not understand what do you mean by "This are the only lines i could Not hide with your Online Tool" ....

I tried to obfuscate your code and it works!

I completed your code to get not syntax errors...

so I obfuscated this:

<?php
class dummy
{
     var $activeLicense = null;
     var $trialPeriod = null;
     private function dummy()
     {
         if (!is_null($this->trialPeriod)) {
         }
         if (is_null($this->activeLicense)) {
         }
         $this->trialPeriod = null;
     }
}
?>  

and the result is:

<?php
 /*   __________________________________________________
     |      Obfuscated by YAK Pro - Php Obfuscator      |
     |              on 2015-11-11 19:12:55              |
     |    GitHub: https://github.com/pk-fr/yakpro-po    |
     |__________________________________________________|
 */
 class UCMl1 { var $GwGkA = null; var $RaI1b = null; private function IRbdQ() { goto C4BYg; CguQb: if (!is_null($this->GwGkA)) { goto sOkRU; } goto m4KQx; C4BYg: if (is_null($this->RaI1b)) { goto B5BEN; } goto hrUF1; ntsnR: $this->RaI1b = null; goto I73My; m4KQx: sOkRU: goto ntsnR; hrUF1: B5BEN: goto CguQb; I73My: } } ?>

so for me there is no problem!

when this code is included into a much more bigger code it is impossible to understand anything!

from yakpro-po.

Tobias-Conrad avatar Tobias-Conrad commented on August 23, 2024

what settings do you use? i want to Obfuscate a wordpress plugin, functions and design are separated in classes
Wordpress functions still working? Because it is a wordpress plugin.
howto interact with html files that take content/strings from the Obfuscated php files?

from yakpro-po.

pk-fr avatar pk-fr commented on August 23, 2024

I used the default settings.
for wordpress to work you have to create a specific yakpro-po.cnf config file.
If you want to use yakpro-po on non-pure php file, please convert them to pure php files before obfuscating them.

from yakpro-po.

Tobias-Conrad avatar Tobias-Conrad commented on August 23, 2024

HI,

as i can see there is no wp_function to sort all wordpress functions out. https://developer.wordpress.org/reference/
so there is a need to get all the standard connections to wordpress in your specific yakpro-po.cnf config file. That is like antivirus definitions, needed to be updated on every WP release (every 6 months)
May also need to implement WooCommerce connections when plugin works with woocommerce.
So the idea of building a search engine for gatering all the connections is needed.
https://developer.wordpress.org/reference/
https://docs.woothemes.com/wc-apidocs/package-WooCommerce.html

Software as a Service will do great. Just to mention https://www.ioncube.com/online_encoder.php
Zend free 30 Day version. but both need to install a loader. so i am out of that, i tried but not sold any secured plugins.

A user workflow would be uploading the plugin files in a zip file to a https page and get a 8 hours test version back for free. Just a php timer, stop when reach + 8 hours.
When testing and it is working i pay for my secured code and get the code without a time limit.
I pay 6 $ for a small plugin. on every update i have to come back and pay again 6$
price based on files and lines of code.

for now it would be nice to have a function to upload a zip file with php files inside on your online demo at: https://www.php-obfuscator.com/?demo
So i could use the one line function for my whole plugin.

from yakpro-po.

Related Issues (20)

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.