home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2005 June
/
PCWorld_2005-06_cd.bin
/
software
/
vyzkuste
/
firewally
/
firewally.exe
/
framework-2.3.exe
/
disassemble
< prev
next >
Wrap
Text File
|
2003-11-07
|
396b
|
23 lines
use B::Disassembler qw(disassemble_fh);
use FileHandle;
my $fh;
if (@ARGV == 0) {
$fh = \*STDIN;
} elsif (@ARGV == 1) {
$fh = new FileHandle "<$ARGV[0]";
} else {
die "Usage: disassemble [filename]\n";
}
sub print_insn {
my ($insn, $arg) = @_;
if (defined($arg)) {
printf "%s %s\n", $insn, $arg;
} else {
print $insn, "\n";
}
}
disassemble_fh($fh, \&print_insn);