I have been working on to find a solution to hide the business logic of a Perl code so that the project can be delivered to the customer network without much concern. Ofcourse I am sure that it's almost impossible to completely secure the code from "too curious" eyes, but I tried to make things harder for them. Now I need your thoughts/suggestions/criticism for the below mentioned approach.

I have developed 2 different executable using C programming language. (i) The first program is responsible for encrypting the Perl code with password protected custom encryption logic. This will also modify the Perl script to change Shebang line (to include custom perl intertreter) and add another BEGIN block which restricts use of default Perl interpreter & debugger. (ii) The second program (namely myPerl.exe) has actualy replaced the original "Perl.exe" interpreter. It is responsible for decrypting the encrypted Perl code and perform an in-memory execution. Now the password can be stored in a scattered way inside the encrypted Perl code. It will also restrict the debug mode so that the code can not be viewed. Although the debugging can be performed by providing a password.

I have implemented this already and it's working fine. During the time of execution it is expected to decrypt the code, so it slightly increases the execution time, but I have no problem with that. I will be very happy to receive your valuable feedback/suggestions on this approach. Thanks in advance.


In reply to Code hiding in Perl by sumanta

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.