/usr/lib/radare/bin/spcc-fe 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 | #!/bin/sh
#
# radare_cmd_raw("!!rsc spcc-fe file $BLOCK $OFFSET",0);
#
[ -z "$SPCCPATH" ] && SPCCPATH="${HOME}/.radare/spcc"
if [ "$1" = "" ]; then
echo "spcc-fe - structure parser c compiler (frontend)"
echo "Usage: rsc spcc-fe [file] [block] [offset]"
echo "SPCCPATH='$SPCCPATH' environ to define .spcc files"
echo "EDITOR='$SPCCPATH' environ to define .spcc files"
exit 0
fi
if [ "$2" = "" ]; then
cd $SPCCPATH
ls -- *.spcc | sed -e 's,\.spcc,,g'
exit 0
fi
FILE=$1
BLOCK=$2
ADDR=$3
mkdir -p $SPCCPATH
cd $SPCCPATH
if [ ! -e "$FILE.spcc" ]; then
if [ -z "$EDITOR" ]; then
echo "You must specify EDITOR to create spcc files"
exit 1
else
rsc spcc -t > $FILE.spcc
$EDITOR $FILE.spcc
fi
fi
[ ! -e $FILE ] && rsc spcc $FILE.spcc -o $FILE
[ $FILE.spcc -nt $FILE ] && rsc spcc $FILE.spcc -o $FILE
[ ! -e $FILE ] && exit 1
$SPCCPATH/$FILE $BLOCK $ADDR
exit 0
|