Here is my favorite typical way of decompiling perl.
use Data::Dumper;
use B::Deparse;
use Devel::Size qw(size total_size);
use B::Concise;
use Devel::Peek;
my $deparse = B::Deparse->new();
print $deparse->coderef2text(*Win32::LoadLibrary{CODE});
print "\n\n".size(\&Win32::LoadLibrary )."\n\n";
my $walker = B::Concise::compile('-src','-exec',*Win32::LoadLibrary);
$walker->();
Dump(*Win32::LoadLibrary{CODE});
Output:
;
247
*Win32::LoadLibrary:
*Win32::LoadLibrary is XS code
SV = IV(0xcbaf78) at 0xcbaf7c
REFCNT = 1
FLAGS = (TEMP,ROK)
RV = 0xc45b3c
SV = PVCV(0xc12a3c) at 0xc45b3c
REFCNT = 2
FLAGS = ()
COMP_STASH = 0x0
XSUB = 0x3a2528
XSUBANY = 3
GVGV::GV = 0xc45b2c "Win32" :: "LoadLibrary"
FILE = "Win32.xs"
DEPTH = 0
FLAGS = 0x800
OUTSIDE_SEQ = 0
PADLIST = 0x0
OUTSIDE = 0x0 (null)
Deparse can't decompile C for you. Only pure perl functions. Try Ollydbg (shareware) or pay for Ida Pro if you need to decompile machine code.
update: WSD::Filter is a proprietary not-FOSS XS module with a EULA for an Apache webserver. To OP, either buy the license, or buy Ida Pro, or both (if you want to make sure your binary blob isn't a rootkit).
update: since you use linux, I strongly suggest not investing in a copy of Ida Pro since Ida Pro only understands MS symbol files, not GCC symbol data.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.