开发者

How to protect PHP codes with serial/license mechanism with oauth or similar model to make client-server requests?

开发者 https://www.devze.com 2023-04-02 06:27 出处:网络
After searching for many and many encoding/encryption softwares, I have came to conclusion that none of those can protect your source codes from reverse-engineering attempts.

After searching for many and many encoding/encryption softwares, I have came to conclusion that none of those can protect your source codes from reverse-engineering attempts.

Even iOncube, zend has decompilers out there. I even tried safeguardian but found that it can also be cracked. Most of the the softwares out there which doesn't require any server side prior installation are doing obfuscation of our source codes. By applying enourmous efforts on those obfuscated codes, it can still be cracked.

So i came to the conclusion, if i distribute only part of the source code running on my client's machines and then to obtain rest of the flow, client sends request to my server. So at that point i can recognize the g开发者_运维百科enuinity of client and choose wheather to provide further required data or not.

I belive for this flow, client will have to obtain an API key or something like that first to make requests to my server. Please correct me if i'm wrong but it is more like to use Oauth client server model or something like that.

Can anyone provide me an example on such mechanism? Or atleast where i should start? I do understand that reverse-engineers may find parallel way for missing codes but i think i can take my chances there instead of just obfuscation of my codes or byte code encryption provided by zend, ioncube etc. etc. Any help will be strongly appreciated.

P.S. i'm adding an example for what i'm looking for- For e.g. - Lets say following is the php file residing on client's machine: client.php

<?php
get_further_data($consumer_key,$consumer_secret)
{
----this will send request to server.php or so on my server with above keys to obtain $req----  
}

some_function($req)
{
    if($req)
    {
        ----further processing on $req----
    }
    else die();
}
?>

Below is the file on my server: server.php

<?php
get_requests($consumer_key,$consumer_secret)
{
    ----if the requesting host is valid and keys are binded to that host only then provide $req----
}
?>

In outh there is something like public key and private key etc. etc. i dont know that mechanism but whatever it might be, i haven't specified in above e.g. I guess that RSA and oauth and all those things are really something promising. And yes this is all for just to protect few php codes and some data.. If you think its bit too much well then i might have much higher taste or may be facebook, google, twitter have also done bit too much to protect some codes and some data. Cheers! lol


You can try phalanger and compile php for Windows.

0

精彩评论

暂无评论...
验证码 换一张
取 消