/usr/lib/radare/bin/flag 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 | #!/bin/sh
#
# author: pof <eslack.org>
#
if [ -z $1 ]; then
echo "Usage: flag [file]">/dev/stderr
exit 1
fi
FILE=$1
type=`file $FILE |awk '{print $2}'`
echo "Automagically flagging $FILE" >/dev/stderr
case "$type" in
"PE")
rsc syms-pe-flag ${FILE}
rsc strings-pe-flag ${FILE}
;;
"ELF")
rsc flag-sections ${FILE}
rsc syms-dbg-flag ${FILE}
## are we being called from debugger??
#if [ -n "$DPID" ]; then
# rsc syms-dbg-flag ${FILE}
#else
# rsc syms-flag ${FILE}
#fi
rsc strings-flag ${FILE}
rsc syscall-flag ${FILE}
;;
esac
echo "s entrypoint"
|