Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Can I get compiled code in Perl like in Java(class file)

by Dog and Pony (Priest)
on Mar 07, 2002 at 09:48 UTC ( [id://149980]=note: print w/replies, xml ) Need Help??


in reply to Can I get compiled code in Perl like in Java(class file)

I see that others already gave the answer, so I will give some food for thought:

If the reason for compiling is security reasons, you have serious problems - you should really tighten up that security before anything else.

You might, or you might not, want to mention facts like this to your client - either way, you are better off knowing this. The .class files for java is today only a minor hindrance if you don't have the source code. Decompilers like JAD works some insane magic to bring back the original source code, and all you really lose today are some of the variable names and the comments. Now, I am not very proficient in exactly which modules to use in perl, but at a guess, somewhere between B::Disassembler and B::Deparse probably would render that bytecoding useless as a means of concealment. Have not tried it though, but it is perlish to be possible to reverse engineer. :)

The next step is of course, as MZSanford suggested, to compile all the way. Thay way you have a binary file much like any other - too hard to decompile for it to be worth it.

Then again, maybe it is just your client that is concerned about this, due to reading some technical article he/she doesn't actually understand. (Pointy hair: "I think we should build a SQL database." Dilbert: "What color do you want it?" Pointy hair: "I think muave has more RAM."). In this case, you can just take the above suggestions, implement and everybody goes home happy. In either case, I think you are not worse off for knowing about these tools - and knowing that there are no replacement for real security, and of the would-be replacements, security through obfuscation is one of the most unreliable. Avoid at all costs. :)


You have moved into a dark place.
It is pitch black. You are likely to be eaten by a grue.
  • Comment on Re: Can I get compiled code in Perl like in Java(class file)

Replies are listed 'Best First'.
Re: Re: Can I get compiled code in Perl like in Java(class file)
by dhable (Monk) on Mar 07, 2002 at 18:05 UTC
    I faced something similar to this a while back. This is just some more food for thought (and maybe a little OT). My understanding of Perl 6 was that you could ask Perl to produce byte code that is compatable with Parrot. Does this mean that someone could write a Parrot to native instruction set compiler? This seems like a common problem, as I found Python programmers created a Py2Exe as well. Does anyone know about Parrot's direction for such things?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://149980]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-19 22:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found