Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Is there a way to decode perlcc bytecode?

by Lana (Beadle)
on Jul 06, 2007 at 23:19 UTC ( [id://625369]=perlquestion: print w/replies, xml ) Need Help??

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

Hi ;)

I've searched through many-many perlcc discussions here at PM but still can't find an answer to my question. Is there a way for reverse engeneering the bytecode generated by using perlcc like this:

perlcc -B test.cgi -o test2.cgi

I know this is possible in theory.. but how to do this practically?

Lana

Replies are listed 'Best First'.
Re: Is there a way to decode perlcc bytecode?
by chromatic (Archbishop) on Jul 07, 2007 at 05:26 UTC

    In theory, you could unserialize the bytecode into the optree (which one of the modules, maybe B::ByteLoader can do), then capture execution (perhaps with O or another module with a cleverly-placed INIT block) and start feeding code references to B::Deparse.

    At least, that's the easiest way I can imagine.

    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-23 17:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found