Protecting PHP Code

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Bokma

    #16
    Re: Protecting PHP Code

    syren wrote:
    [color=blue]
    > OK, I understand your point in saying that the customer can find source
    > code elsewhere, but seriously. This guy came on here for help and you
    > respond with "your software is not special, get over it". That's
    > really nice. Maybe when you're done on the computer you can go kick a
    > couple of puppies, too.[/color]

    Puppies, hah, that's for beginners :-D.

    --
    John MexIT: http://johnbokma.com/mexit/
    personal page: http://johnbokma.com/
    Experienced programmer available: http://castleamber.com/
    Happy Customers: http://castleamber.com/testimonials.html

    Comment

    • TheLobster at Gmail dot Com

      #17
      Re: Protecting PHP Code

      What kind of contract do you have with the company? If it's an
      agreement where they are paying you $X an hour to develop the code then
      they own the code just as if you were working on an assymbly line
      making cars, they own the car and you get paied for your time. If they
      said we need the ability to do X, Y, Z and you said alright, I'll
      develop an application for that then you have a bit more flexability.
      I'd use Zend because it's closly tied with the PHP group. As you made
      it sound, you are in a Windows enviroment. I only work in a *nix
      enviroment so I'm not sure how Zend works in Windows, but it's worth
      the try. Now as far as the licencing fee, build the code and encode it.
      Forwarn the client that in order to run the code they will be required
      to purcease a licence of the Zend server and that it will be approx.
      $1000

      Comment

      • Jamie Isaacs

        #18
        Re: Protecting PHP Code

        TheLobster at Gmail dot Com wrote:[color=blue]
        > What kind of contract do you have with the company? If it's an
        > agreement where they are paying you $X an hour to develop the code then
        > they own the code just as if you were working on an assymbly line
        > making cars, they own the car and you get paied for your time. If they
        > said we need the ability to do X, Y, Z and you said alright, I'll
        > develop an application for that then you have a bit more flexability.
        > I'd use Zend because it's closly tied with the PHP group. As you made
        > it sound, you are in a Windows enviroment. I only work in a *nix
        > enviroment so I'm not sure how Zend works in Windows, but it's worth
        > the try. Now as far as the licencing fee, build the code and encode it.
        > Forwarn the client that in order to run the code they will be required
        > to purcease a licence of the Zend server and that it will be approx.
        > $1000
        >[/color]

        <snip>
        The Zend Optimizer is a free application that runs the files encoded by
        the Zend Encoder and Zend SafeGuard Suite, while enhancing the running
        speed of PHP applications.

        Benefits

        * Enables users to run files encoded by the Zend Encoder
        * Increases runtime performance up to 40%.
        </snip>

        Not sure why any production php application would not be using the free
        optimizer? Just buy the encoder and forget the rest... Well worth the
        cost if you write code people want to resell.

        As far as who owns the code.. It depends on where you developed the code
        and who was the majority manager of the effort. If they were independent
        of the project other than developing requirements then it is most likely
        your code. If they worked you like one of their own programmers then
        your out of luck.

        -JI

        Comment

        • Ira Baxter

          #19
          Re: Protecting PHP Code


          "Harold Crump" <orientletter@y ahoo.com> wrote in message
          news:1104848128 .015768.306920@ f14g2000cwb.goo glegroups.com.. .[color=blue]
          > Greetings,
          >
          > I have a PHP/MySQL application that I am deploying at a client's.
          >
          > I am fairly certain that they will steal my source code and re-sell to
          > other companies.
          >
          > I would like to somehow protect the source code.
          >
          > Here are some of the options I have thought about....[/color]

          [snip]
          [color=blue]
          > 3. Use an obfuscator that sits between the web server and the PHP
          > runtime and encrypts/decrypts the .php files on the fly.
          >
          > I have looked at some common obfuscators and they are no good.
          > All they do is replace function and variable names with some gibberish,
          > but a simple Find/Replace using Notepad can break the obfuscation.
          >
          > Can anyone recommend a real obfuscator that is less stupid than the
          > person stealing the code?[/color]

          (Warning: Biased observer ahead. We supply an PHP obfuscator).

          I feel compelled to observer that most thieves are stupider :-}
          That's not the point of an obfuscator.

          It is true that obfuscators most scramble identifier names.
          (They also remove your carefully crafted comments
          describing the how the code works, too. You do
          have such comments, right?)

          What makes your program hard to understand is lot of structure
          and complexity, and a complete absence of good cues for
          deciding how it works. Obfuscators succeed (to the extent they do)
          by removing such cues.

          Most useful programs are complex enough so that even with
          good naming conventions and careful comments,
          they are hard to understand. Witness
          the cost of conventional software maintenance.
          Obfuscators push this to the extreme.
          To recover a name, and "used Notepad to break
          the obfuscation", the thief has to first figure
          out what the code means.

          Now, if your code is so simple (e.g., a few pages,
          pure straight-line code, no algorithms) that a thief
          can figure out the names of everything of interest
          easily, an obfuscator won't help you. But then,
          if it is that simple, the thief (well, the smart ones,
          er, contradiction?) can code the functionality
          themselves.

          If you have dozens of pages with complex logic,
          a thief will have a very hard time recovering all
          the code.

          Obfuscators also have the advantage (over
          most of the other encrypting solutions) of not
          making you force your customer to configure
          his PHP server *your* way.

          The other "encrypting " solutions aren't really different.
          They don't stop a thief from stealing your code.
          They simply raise the price. The question
          for you is, how to raise the price higher than
          most thieves want to go?

          Regarding other discussions: I agree that a legal
          agreement is a good thing to have, also. Having
          said that, it assumes that your customer is willing
          to play by the rules or at least be sued in a court with rules, and it
          assumes that you have the courtroom staying power
          to stick out the contest. If your customer isn't
          in your legal jurisdiction, you may find it hard
          to enforce your rights. (The Chinese don't
          seem much concerned that Hollywood is unhappy
          with bootleg movies).

          If you *do* succeed in getting him to court,
          then asking him to cough up his source code
          to prove it is his is likely to occur. If what
          he has is clearly "obfuscated " code with a
          few Notebook-restored variables, he'll have
          a tough time explaining why.

          -- IDB





          Comment

          • R. Rajesh Jeba Anbiah

            #20
            [OT] Re: Protecting PHP Code

            lunatech wrote:[color=blue]
            > Chung Leong wrote:[/color]
            <snip>[color=blue][color=green]
            > > Put a backdoor into the program that let you hijack their server.[/color]
            >
            > Get yourself checked out. This is unethical.[/color]

            LOL! Are you a newcomer? Aren't you reading alt.fan.chungle ong? ;-)

            --
            <?php echo 'Just another PHP saint'; ?>
            Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

            Comment

            • lunatech

              #21
              Re: Protecting PHP Code

              syren wrote:[color=blue]
              > OK, I understand your point in saying that the customer can find[/color]
              source[color=blue]
              > code elsewhere, but seriously. This guy came on here for help and[/color]
              you[color=blue]
              > respond with "your software is not special, get over it".[/color]


              Maybe working with Free software has made me think that getting the
              source code of the software I use is my right (and I should provide my
              customers with the same rights). My aim in pointing out that his
              software is not special was that he should spend more time in making
              his software robust and user friendly rather than finding means to put
              in backdoors in them. Trust me, if you are good people will come to
              you. Maintenance of code is hard work.

              Obfuscation does not work, period. Google has some pretty nifty
              javascript tricks in Google suggest AND has taken pains to obfuscate
              it. However, it has been dissected
              http://developers.slashdot.org/artic.../12/18/0139249 .

              To put it politely "All your base are belong to us" [1], get over it
              ;-)

              [1] http://en.wikipedia.org/wiki/All_you...e_belong_to_us

              --

              Raj Shekhar
              System Administrator, programmer and slacker
              home : http://rajshekhar.net
              blog : http://rajshekhar.net/blog/
              work : http://netphotograph.com

              Comment

              • lunatech

                #22
                Re: Protecting PHP Code

                R. Rajesh Jeba Anbiah wrote:[color=blue]
                > lunatech wrote:[color=green]
                > > Chung Leong wrote:[/color]
                > <snip>[color=green][color=darkred]
                > > > Put a backdoor into the program that let you hijack their server.[/color]
                > >
                > > Get yourself checked out. This is unethical.[/color]
                >
                > LOL! Are you a newcomer? Aren't you reading alt.fan.chungle ong? ;-)
                >[/color]

                heh, yes I am a newcomer to the usenet (using google groups). An old
                hand in some other mailing lists :-)

                --
                Raj Shekhar
                System Administrator, programmer and slacker
                home : http://rajshekhar.net
                blog : http://rajshekhar.net/blog/
                work : http://netphotograph.com

                Comment

                • R. Rajesh Jeba Anbiah

                  #23
                  [OT] Re: Protecting PHP Code

                  lunatech wrote:[color=blue]
                  > R. Rajesh Jeba Anbiah wrote:[/color]
                  <snip>[color=blue][color=green]
                  > > LOL! Are you a newcomer? Aren't you reading alt.fan.chungle ong? ;-)
                  > >[/color]
                  > heh, yes I am a newcomer to the usenet (using google groups). An old
                  > hand in some other mailing lists :-)[/color]

                  Cool, welcome to the world of saints:)

                  --
                  <?php echo 'Just another PHP saint'; ?>
                  Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

                  Comment

                  Working...