I saw a method of doing this awhile ago where the code was wrapped into c binary. It only prevented novices
from viewing the code, since all you needed to do was open the binary file and browse through it.


i have a snippet from one of my chat logs ...
/*#define MULTIPLICITY */ /* try not to be a bad boy, avoid tinkering +with the interpreter's internal structure! */ \#include <EXTERN.h> \#include <perl.h> \#include <stdlib.h> static PerlInterpreter *pi; static char *script = $scriptText; int main(int argc, char **argv, char **envv) { int l, i, p_argc; char **p_argv; char *e_switch = \"-e\"; char *real_name = argv[0]; char *s_argv[2] = { e_switch, script } ; char **p_envv = envv; p_argc = argc+2; p_argv = (char **)malloc(sizeof(char*)*argc); p_argv[0] = argv[0]; p_argv[1] = s_argv[0]; p_argv[2] = s_argv[1]; for(i=1;i<argc;i++) { p_argv[i+2]=argv[i]; } pi = perl_alloc(); perl_construct(pi); perl_parse(pi,NULL,p_argc,p_argv,p_envv); { SV *sv; sv = perl_get_sv(\"0\",FALSE); if (!SvOK(sv)) { printf(\"%s: unrecoverable error\\n\",argv[0]); exit(EXIT_FAILURE); } sv_setpv(sv,argv[0]); } perl_run(pi); perl_destruct(pi); perl_free(pi); return EXIT_SUCCESS; }
I wish i could remember what it was called or who wrote it.
I'll try and find it on my old disks

In reply to Re: Concealing Perl Code by jaco
in thread Concealing Perl Code by Gorby

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.