forked from RUB-SysSec/loki
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·40 lines (33 loc) · 1.06 KB
/
setup.sh
File metadata and controls
executable file
·40 lines (33 loc) · 1.06 KB
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
#!/usr/bin/env bash
# This script will install
# * z3 (needed for Loki)
# * python packages needed by LokiAttack
# * Triton needed by byte-granular taint analysis
# * Intel Pin needed for experiment 2
# Intended for use within our Docker container
set -eu
if [ ! -f /.dockerenv ]; then
echo "Did not find file '/.dockerenv' -- this script should be run inside our docker container"
exit 1
fi;
echo "Installing Loki (including z3 dependency)"
pushd loki > /dev/null
./build.sh
popd > /dev/null
echo "Installing LokiAttack's Python dependencies"
pushd lokiattack > /dev/null
python3 -m pip install wheel
python3 -m pip install --user -r requirements.txt
echo "Installing Triton (used for byte-level taint analysis)"
if [ ! -d Triton ]; then
rm -f /home/user/.pyenv/versions/3.9.0/lib/python3.9/site-packages/triton.so
./install_triton.sh
else
echo "Triton directory already exists. Skipping.."
fi
popd > /dev/null
echo "Installing Pin for Experiment 2"
pushd experiments/experiment_02_coverage/tracer > /dev/null
./install_pin.sh
popd > /dev/null
echo "Done."