Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Embedding perl in Java

Reply
Thread Tools

Embedding perl in Java

 
 
Shalini Joshi
Guest
Posts: n/a
 
      06-19-2004
Hi!

I found out about the JPL module that allows us to write perl code
within a java program and vice versa.

The reason I'd be interested in this particular thing is that we dont
want our clients to actually see the source code(i am guessing there
is no way to hide a perl script from a user and just give an
executable kind-of, since it's a script). So to actually produce a
product we thought of embedding the script in a java program and
compiling it and then the byte code could be supplied to the client.

Is this reasoning/line of thought correct? And if so, how do I go
about using jpl and designing the program?

I have gotten various helpful tips from this group and would really
appreciate help on this one too.


THanks a lot!

Regards,

Shalini
 
Reply With Quote
 
 
 
 
Ben Morrow
Guest
Posts: n/a
 
      06-19-2004

Quoth http://www.velocityreviews.com/forums/(E-Mail Removed) (Shalini Joshi):
>
> I found out about the JPL module that allows us to write perl code
> within a java program and vice versa.
>
> The reason I'd be interested in this particular thing is that we dont
> want our clients to actually see the source code(i am guessing there
> is no way to hide a perl script from a user and just give an
> executable kind-of, since it's a script). So to actually produce a
> product we thought of embedding the script in a java program and
> compiling it and then the byte code could be supplied to the client.
>
> Is this reasoning/line of thought correct? And if so, how do I go
> about using jpl and designing the program?


No. The Perl source would still be visible; the user would still need
Perl installed.

For advice on (the futility of) concealing Perl code in general, see
perldoc -q hide.

Ben

--
perl -e'print map {/.(.)/s} sort unpack "a2"x26, pack "N"x13,
qw/1632265075 1651865445 1685354798 1696626283 1752131169 1769237618
1801808488 1830841936 1886550130 1914728293 1936225377 1969451372
2047502190/' # (E-Mail Removed)
 
Reply With Quote
 
 
 
 
Shalini Joshi
Guest
Posts: n/a
 
      06-20-2004
Ben Morrow <(E-Mail Removed)> wrote in message
>
> No. The Perl source would still be visible; the user would still need
> Perl installed.
>
> For advice on (the futility of) concealing Perl code in general, see
> perldoc -q hide.
>
> Ben




Hi.

Thanks a lot Ben for this information. All this while we were really
feeling smart thinking we could actually solve the problem of hiding
the source by embedding perl in java. Is there a solution to this
problem? Do u mean to say that no commercial product makes use of Perl
as a source language??

So since most of the work involved in this project deals with text
parsing, would it be advisable to use perl now, since we wouldn't be
able to keep the source code to ourselves? We are thinking of
licensing the product rather than provide services.

I am an intern and most of this business and product concept is very
new to me as am mostly used to just rattling off code and making
applications, and have never done the product or source code hiding
thiing before. I'd really appreciate any help in this regard. Needless
to say, the group has helped me out a lot already and would like to
thank you for that ..

Regards,

Shalini.
 
Reply With Quote
 
Ben Morrow
Guest
Posts: n/a
 
      06-20-2004

Quoth (E-Mail Removed) (Shalini Joshi):
> Ben Morrow <(E-Mail Removed)> wrote in message
> >
> > For advice on (the futility of) concealing Perl code in general, see
> > perldoc -q hide.

>
> Thanks a lot Ben for this information. All this while we were really
> feeling smart thinking we could actually solve the problem of hiding
> the source by embedding perl in java. Is there a solution to this
> problem? Do u mean to say that no commercial product makes use of Perl
> as a source language??


Have you read that faq? There are a variety of solutions, none of them
secure. It doesn't matter, though, as source code hiding never works
anyway and all you need to do is slap a big fat copyright notice on it
and noone can steal it.

You would need to talk to your company lawyers, of course.

Ben

--
Outside of a dog, a book is a man's best friend.
Inside of a dog, it's too dark to read.
(E-Mail Removed) Groucho Marx
 
Reply With Quote
 
Shalini Joshi
Guest
Posts: n/a
 
      06-21-2004
Hey!

Yeah Ben, thanks again..i managed to use perlcc to produce an
executable on the unix system. It didnt work on windows though(like it
had been pointed out in the doc)so used the B module to produce the
bytecode.

Yeah will let my boss know about the source code hiding issues..thanks
again.

--Shalini


Ben Morrow <(E-Mail Removed)> wrote in message news:<cb4p8t$h7d$(E-Mail Removed)>...
> Quoth (E-Mail Removed) (Shalini Joshi):
> > Ben Morrow <(E-Mail Removed)> wrote in message
> > >
> > > For advice on (the futility of) concealing Perl code in general, see
> > > perldoc -q hide.

> >
> > Thanks a lot Ben for this information. All this while we were really
> > feeling smart thinking we could actually solve the problem of hiding
> > the source by embedding perl in java. Is there a solution to this
> > problem? Do u mean to say that no commercial product makes use of Perl
> > as a source language??

>
> Have you read that faq? There are a variety of solutions, none of them
> secure. It doesn't matter, though, as source code hiding never works
> anyway and all you need to do is slap a big fat copyright notice on it
> and noone can steal it.
>
> You would need to talk to your company lawyers, of course.
>
> Ben

 
Reply With Quote
 
Joe Smith
Guest
Posts: n/a
 
      06-21-2004
Shalini Joshi wrote:

> .. All this while we were really
> feeling smart thinking we could actually solve the problem of hiding
> the source by embedding perl in java. Is there a solution to this
> problem? Do u mean to say that no commercial product makes use of Perl
> as a source language??


There are many commercial products that use Perl.
Including the source code does not make a product non-commercial.

You could store the Perl part as an encrypted string, then have
Java decrypt the string before feeding it to the embedded Perl
interpreter. But that has the same flaw as others; by monitoring
the Java program as it runs, the decryption process is revealed.
-Joe
 
Reply With Quote
 
Shalini Joshi
Guest
Posts: n/a
 
      06-27-2004
Hey!

Thanks a lot for the information.

I appreciate it..

Regards

shalini
Lincoln Yeoh <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>. ..
> On 20 Jun 2004 23:00:25 -0700, (E-Mail Removed) (Shalini Joshi)
> wrote:
>
> >Hey!
> >
> >Yeah Ben, thanks again..i managed to use perlcc to produce an
> >executable on the unix system. It didnt work on windows though(like it
> >had been pointed out in the doc)so used the B module to produce the
> >bytecode.
> >
> >Yeah will let my boss know about the source code hiding issues..thanks
> >again.

>
> For windows - try par and for executable compression try upx
>
> http://search.cpan.org/~autrijus/PAR/lib/PAR.pm
>
> There are many commercial products that use perl. Often without
> obfuscation. Whether people have the source code or not doesn't stop
> them from copying your stuff and using it. I use UPX+PAR just coz it
> bundles things up in a single convenient file and users do not need to
> install perl. But some AV scanners[1] seem to take a bit longer to
> scan stuff like this.
>
> It only makes it harder for people to figure out or extend/modify it.
> It doesn't make it impossible.
>
> The people who don't pay and bother to figure out your source code
> often aren't going to pay for it - they either have less need for it
> (they're smart enough to write much of it themselves), or they aren't
> going to pay for it anyway.
>
> Whereas the people who've already paid for it may regard having the
> source code as a big plus. I'd personally prefer buying a program
> that's easy to fix and modify, coz often programs outlast support from
> the vendors that supply them.
>
> Given a suitably viral license it may be disadvantageous for people to
> copy and reuse your code without permission. You may wish to consult
> your lawyers about that.
>
> That said, I'm not too fond about these license things. What are the
> limits of such things anyway? How valid are they? Someone should
> implement a software license that requires users to howl at the moon
> _publicly_ every month or brush their teeth after every meal.
>
> [1] I wonder how AV scanners deal with obfuscated polymorphic
> perl/lisp/etc viruses/worms...

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl Pro but Java Newbie: Need nudge in proper direction for myfavorite Perl routine in Java /usr/ceo Java 32 09-15-2008 12:12 AM
Embedding Perl into C: Why? Frank Iannarilli Perl 1 06-03-2004 04:53 AM
Experts on embedding Perl in C wanted: Weird problem on RH7.3/Perl 5.6.1 David F. Skoll Perl 2 11-14-2003 05:37 PM
embedding perl within perl.... suraj Perl Misc 4 11-07-2003 06:02 PM
embedding perl in new language: dynaload problem Boris R. Perl 0 10-15-2003 06:23 PM



Advertisments