forked from plasma-disassembler/plasma
-
Notifications
You must be signed in to change notification settings - Fork 1
/
requirements.sh
executable file
·50 lines (40 loc) · 1015 Bytes
/
requirements.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
#!/bin/sh
REQ_EXEC="python3 pip3"
for EXEC in ${REQ_EXEC}
do
if [ ! -x "$(command -v $EXEC)" ]
then
echo "error: unable to find $EXEC, this is required to setup this project"
exit
fi
done
PYTHON_VERSION=`python3 -c 'import sys; print("%i" % (sys.hexversion<0x03040000))'`
if [ $PYTHON_VERSION -ne 0 ]; then
echo "error: you need at least python 3.4 to run this project"
exit
fi
rm -rf /usr/lib/python3.*/site-packages/capstone*
rm -rf build
mkdir -p build
cd build
CAPSTONE_VERSION=3.0.4
# Capstone
git clone -b $CAPSTONE_VERSION --depth 1 https://github.com/aquynh/capstone
cd capstone/
./make.sh
sudo ./make.sh install
# Bindings
cd bindings/python
sudo make install3
cd ../../..
# PE
# TODO: pip3 install pefile
# -> fails due to a syntax error
git clone -b master --depth 1 https://github.com/mlaferrera/python3-pefile
cd python3-pefile
sudo -H python3 setup.py install
cd ..
# ELF
sudo -H pip3 install pyelftools
# Msgpack
sudo -H pip3 install msgpack-python