2002-01-22 16:24:09 +01:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
use strict;
|
|
|
|
use POSIX;
|
|
|
|
use locale;
|
|
|
|
|
|
|
|
$| = 1;
|
2001-02-06 12:12:10 +01:00
|
|
|
|
|
|
|
while(<>) {
|
|
|
|
if (/^\t\t\t( [0-9a-f]{2,4})+$/) {
|
2002-01-22 16:24:09 +01:00
|
|
|
chomp;
|
|
|
|
my @hex = split;
|
|
|
|
my $line = "$_ ";
|
|
|
|
foreach my $i (@hex) {
|
|
|
|
my @c = pack("H4", $i);
|
|
|
|
foreach my $j (split(//, "@c")) {
|
|
|
|
$line .= isprint($j) ? "$j" : ".";
|
2001-02-06 12:12:10 +01:00
|
|
|
}
|
|
|
|
}
|
2002-01-22 16:24:09 +01:00
|
|
|
print "$line\n";
|
2001-02-06 12:12:10 +01:00
|
|
|
} else {
|
|
|
|
print
|
|
|
|
}
|
|
|
|
}
|