/usr/lib/radare/bin/bdf2rad is in radare-common 1:1.5.2-6.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #!/usr/bin/perl
#
# rsc bindiff output to radare cmd
print "e file.insertblock=false\n";
print "e file.insert=false\n";
my $type=0;
while($line=<STDIN>) {
chomp $line;
$line=~s/\t/ /g;
$a=$b=$c=" ";
$diff=1;
if ($line=~/\|/) {
$line=~tr/|/ /;
$line=~/(\w*)\s*(\w*)/;
print "e file.insert=false\n" if ($type == 1);
printf("wx $2 @ 0x%x\n", $offb);
$type = 0;
$a="\e[44m$1\e[0m";
$b=" |";
$c="\e[44m$2\e[0m";
$offa++;
$offb++;
} elsif ($line=~/>/) {
$line=~s/(\s|>)*//g;
$c="\e[42m$line\e[0m";
$b=" >";
print "e file.insert=true\n" if ($type != 1);
printf("wx $line @ 0x%x\n",$offb);
$type=1;
$offb++;
$color="\e[42m";
} elsif ($line=~/</) {
$line=~s/(\s|<)*//g;
$a="\e[41m$line\e[0m";
$b="< ";
$offa++;
print "e file.insert=false\n" if ($type == 1);
$type = 0;
printf ("r -1 @ 0x%x\n", $offb);
} else {
$line=~/(\w*)\s*(\w*)/;
$a=$1;
$c=$2;
$offa++;
$offb++;
$diff=0; # no differences here.
}
$line=~/(\w*)\s*(\w*)/;
if ("$a$c" eq " ") { $a=$1; $c=$2; }
$odiff = $diff;
}
|