-
Notifications
You must be signed in to change notification settings - Fork 23
/
run_gnu.sh
executable file
·69 lines (61 loc) · 1.49 KB
/
run_gnu.sh
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash -eu
set -x
source config/path_variables.py
declare -a input_list=(
"${BINKIT_DATASET}/gnu_debug.txt"
"${BINKIT_DATASET}/gnu_debug_sizeopt.txt"
"${BINKIT_DATASET}/gnu_debug_pie.txt"
"${BINKIT_DATASET}/gnu_debug_noinline.txt"
"${BINKIT_DATASET}/gnu_debug_lto.txt"
# "${BINKIT_DATASET}/gnu_debug_obfus.txt"
)
source_list="${BINKIT_DATASET}/gnu_source_list.txt"
ctags_dir="${BINKIT_DATASET}/gnu_ctags_data"
for f in "${input_list[@]}"
do
echo "Processing ${f} ..."
python helper/do_idascript.py \
--idapath "${IDA_PATH}" \
--idc "${IDA_FETCH_FUNCDATA}" \
--input_list "${f}" \
--log
done
for f in "${input_list[@]}"
do
echo "Processing ${f} ..."
python helper/extract_lineno.py \
--input_list "${f}" \
--threshold 1
done
for f in "${input_list[@]}"
do
echo "Processing ${f} ..."
python helper/filter_functions.py \
--input_list "${f}" \
--threshold 1
done
for f in "${input_list[@]}"
do
echo "Processing ${f} ..."
python helper/count_functions.py \
--input_list "${f}" \
--threshold 1
done
for f in "${input_list[@]}"
do
echo "Processing ${f} ..."
python helper/extract_functype.py \
--source_list "${source_list}" \
--input_list "${f}" \
--ctags_dir "${ctags_dir}" \
--threshold 1
done
# needs to adjust 'pool_size' for the obfuscation dataset because it takes too
# much memory.
for f in "${input_list[@]}"
do
echo "Processing ${f} ..."
python helper/extract_features.py \
--input_list "${f}" \
--threshold 1
done