Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Protect php code

Comments in 'Plugin Development' started by mamayadesu, Jul 19, 2015.

  1. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    Hello. Someone found a method of protection PHP code against edition and reading? I tried to obfuscate PHP code (code of function onEnable, onDisable, etc), but or it's displays PHP code at console, or just not works. Even
    Code:
    public function onEnable() {
    eval(base64_decode(/* ...symbols... */));
    }
    not works (If there is an appeal to classes - displays the similar: ClassNotFoundException: "Class Config not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144)
    asyven likes this.
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Don't do that. However you obfuscate it people can still restore it in some way.
    iksaku and EvolSoft like this.
  3. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    I know it. But "better something, than nothing".
  4. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Why you wanna do it?
  5. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    I sell my some plugins on my website. In each non-free plugin there is a verification, is plugin bought or not. I want to complicate circumvention of verification.
  6. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Then you have to type the full (including namespace) names of the classes.
  7. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Is'nt there any license for author rights?
  8. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Try to encode phar file :D
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    And if people disobey?
    All that licensing is simply stupid. You're gonna sue people for stealing things? No. Just don't try to earn money from plugins. It is very hard, and it slows down community development.
    EvolSoft and ahoj_truhliku like this.
  10. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    I think that everyone at this community make things just to know and help people. We don't sell plugins just because we want that everyone can enjoy his server for free. @shoghicp and the entire PocketMine team (administrators, staff...) work hard everyday for free. Our main goal is not to sell our plugins.
    Back to the question, obfuscating PHP is a bad practice and useless at all. Obfuscated code can be always decrypted.
    jojoe77777, iksaku and PEMapModder like this.
  11. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    I tells again: "I want to complicate circumvention of verification". And sell plugins - it's my decision.
  12. mamayadesu
    Offline

    mamayadesu Active Member Plugin Developer

    Joined:
    Sep 19, 2013
    Posts:
    146
    Plugins:
    4
    Minecraft User:
    mamayadesu
    how?
  13. aliuly
    Offline

    aliuly Notable Member Plugin Developer

    Joined:
    Feb 8, 2014
    Posts:
    1,086
    Plugins:
    17
  14. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    OK, so it's also our decision not to help you if you sell plugins.

Share This Page

Advertisement