demode has asked for the wisdom of the Perl Monks concerning the following question:

I'm using embed perl 5.8.0 as a script language in one of my applications. I need to keep scripts somehow encoded in order to prevent users from reading some of my scripts. Since decoding to a temporary file is not secure enough, I need a way to feed perl with decoded in memory scripts. Is there a way to do it?
  • Comment on Parsing/Running script from memory in embed perl

Replies are listed 'Best First'.
Re: Parsing/Running script from memory in embed perl
by chromatic (Archbishop) on Jul 21, 2003 at 18:57 UTC
Re: Parsing/Running script from memory in embed perl
by dragonchild (Archbishop) on Jul 21, 2003 at 19:08 UTC
    In highschool, I had a friend who spent a few weeks reading the ASM for Pool of Radiance and hacked the codewheel section. He had it always display the same question, then display the answer on the screen for you to type in.

    My point is that every single program that a user can get a hold of a copy of (through any means) is hackable. I mean, it has to eventually tell the CPU what to do and a human can, if sufficiently determined, figure out what is going on.

    That said, there are differing levels of difficulty you can create for would-be evil-doers. Using a compiled language for stuff that users aren't supposed to edit is a good start, but Perl won't be compilable until Parrot is out. (Well, it is, but not really.)

    Ultimately, the most secure system is the one that no-one can access. Once you allow access, you allow some level of insecurity. At some point, you just have to grin and bear it.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.