File: symgraph.pl

package info (click to toggle)
radare2 0.9.6-3.1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 17,496 kB
  • ctags: 45,959
  • sloc: ansic: 240,999; sh: 3,645; makefile: 2,520; python: 1,212; asm: 312; ruby: 214; awk: 209; perl: 188; lisp: 169; java: 23; xml: 17; php: 6
file content (25 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
t="/tmp/symgraph"
rm -rf $t
mkdir -p $t/b $t/l

dolib() {
	rabin2 -i $1/libr_$1.so | grep -v mports | cut -d = -f 8 > $t/l/$1.i
	rabin2 -s $1/libr_$1.so | grep -v xports | cut -d = -f 8 > $t/l/$1.s
}

dobin() {
	rabin2 -i ../binr/$1/$1 | grep -v mports | cut -d = -f 8 > $t/b/$1.i
#	rabin2 -s ../binr/$1/$1 | cut -d = -f 8 > $t/b/$1.s
}

LIBS="anal asm bin bp cmd config cons crypto db debug diff flags hash io lang lib line meta parse print reg search sign socket syscall sysproxy th util vm core"
for a in $LIBS ; do
	dolib ${a}
done
BINS="rabin2 rasm2 radare2 rax2 ranal2 rahash2 radiff2 rafind2"
for a in $BINS ; do
	dobin ${a}
done

cat $t/l/*.i $t/l/*.s $t/b/*.i | sort | uniq -c | sort -n | grep r_