Encrypted PHP Code Not Working

Discussion in 'PHP' started by widewebtalk, May 31, 2007.

  1. #1
    Hi i am trying to encrypt a page of code for my script but the code when encrypted will not work.

    When i leave it as is it will work fine but when i encrypt it the code will show on the header of the site decrypted.

    Do some certain scripts not allow to read encrypted code or do i need a .htaccess code to help.

    Appreciate some help if possible thank you.
     
    widewebtalk, May 31, 2007 IP
  2. arcane-angel

    arcane-angel Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i think .htaccess file may help you
    i'm don't sure
     
    arcane-angel, May 31, 2007 IP
  3. mrmonster

    mrmonster Active Member

    Messages:
    374
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #3
    You can't really "encrypt" php as it's not a compiled language and has to be interpreted at run time. I'm guessing you are referring to encoding and not encrypting.

    Getting to the point, there are number of tools that do PHP encoding so you need to be more specific as to what you are using.

    Better yet, the tool you are using, eg. Zend Guard, should have some kind of support forum. Your best bet is to head in that direction, it might be difficult finding help about something as random as that on here.
     
    mrmonster, May 31, 2007 IP
  4. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    What are you using? If it's something like ioncube it requires an extra module, but something like Zend does not.
     
    projectshifter, Jun 1, 2007 IP
  5. widewebtalk

    widewebtalk Peon

    Messages:
    1,630
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #5
    widewebtalk, Jun 1, 2007 IP
  6. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Your files are still .php correct?
     
    projectshifter, Jun 1, 2007 IP
  7. widewebtalk

    widewebtalk Peon

    Messages:
    1,630
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yes my filed are still php the encoding will work on another of my scripts but not on this one could there be a script related issue that does not allow encoding.
     
    widewebtalk, Jun 1, 2007 IP
  8. manilodisan

    manilodisan Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    It's 10 bucks to break a ZEND or Ioncube (which they say are the best) encrypted php code. It's $597 Zend Guard. What's the deal?!
     
    manilodisan, Jun 1, 2007 IP
  9. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Sounds like it's just a really cheap and crappy encoder then.

    It's really not that hard to break the encoding, but Zend Guard is supposed to be fairly nice, I haven't had any experience in breaking it apart, but in this business sometimes you really do get what you pay for.
     
    projectshifter, Jun 1, 2007 IP
  10. mrmonster

    mrmonster Active Member

    Messages:
    374
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #10
    You are not encrypting, you are encoding, aka obfuscating, it might be tricky but theres always a way to reverse engineer it.

    It's there to discourage the average user from getting at the source, but for someone that really wants to do it, it can be done.
     
    mrmonster, Jun 1, 2007 IP
  11. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #11
    It's the same with encrypted code (sometimes easier with memreads), so let's not go there :)

    Obfuscated code has some drawbacks: you can't use register_globals and you can't use variable variables or variable functions. Generally, it's the register_globals that people come up against... could that be the problem?

    Alternatively, you're using a crappy obfuscator... if only there was one that I could recommend ;)
     
    TwistMyArm, Jun 1, 2007 IP
  12. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Register_globals is bad anyway :p
     
    projectshifter, Jun 1, 2007 IP
  13. lionstarr

    lionstarr Peon

    Messages:
    276
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #13
    What is the error, which is displayed?
    If it's for example, that PHP just doesn't understand the encrypted code, than you will probably have to add an "include" of a certain php package or module.
    lionstarr
     
    lionstarr, Jun 1, 2007 IP
  14. projectshifter

    projectshifter Peon

    Messages:
    394
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #14
    He said it worked on his other pages, just not this particular one. I'm going with the explanation of it's just a shitty encoder.
     
    projectshifter, Jun 1, 2007 IP
  15. lionstarr

    lionstarr Peon

    Messages:
    276
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #15
    OH, ok I just didn't notice that. Yeah, that'll be a bad encoder then...
    lionstarr
     
    lionstarr, Jun 2, 2007 IP
  16. widewebtalk

    widewebtalk Peon

    Messages:
    1,630
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Yes you were correct just a crappy encoder i have tried another and it worked fine. Thanks to all for your help.
     
    widewebtalk, Jun 2, 2007 IP
  17. nQQb

    nQQb Active Member

    Messages:
    332
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #17
    Try PhpEasyLock from ypninc.com/store
     
    nQQb, Jul 9, 2007 IP
  18. InFloW

    InFloW Peon

    Messages:
    1,488
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #18

    Err WHMCS a hosting billing system uses ioncube encoding on every single file and they require register_globals to be on. So I think you're incorrect there
     
    InFloW, Jul 9, 2007 IP
  19. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #19
    ionCube 'encoded' is encrypted, not obfuscated. Encrypted files can require register_globals, but require server side libraries as 'out of the box', they are not, in and of themselves, 'legal' PHP.

    Obfuscated files, on the other hand ARE PHP in and of themselves and so do not require anything special server side, but then they cannot require register globals and so on. I mean technically it's possible, but I have not seen any pure obfuscators that allow register_globals.
     
    TwistMyArm, Jul 9, 2007 IP
  20. InFloW

    InFloW Peon

    Messages:
    1,488
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #20
    My fault there I was looking at

    http://www.encodercompare.com/index.php

    And it said Obfuscation so I assume people were lumping some of these together and interchanging encoding, encrypting ect.
     
    InFloW, Jul 9, 2007 IP