-
Notifications
You must be signed in to change notification settings - Fork 9
/
install-dependencies.sh
executable file
·82 lines (75 loc) · 2.03 KB
/
install-dependencies.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
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh
# exit when any command fails
set -e
# get the kernel name
KERNEL="$(uname)"
# install required dependencies
case $KERNEL in
Linux)
# get the distribution name
LINUX_DISTRO="$(awk -F= \
'/^NAME/{gsub(/"/,"",$2);print($2)}' \
/etc/os-release)"
case $LINUX_DISTRO in
Fedora)
sudo dnf install -y \
git \
gcc \
python3 \
python3-devel \
python3-pip \
swig \
pcsc-lite \
pcsc-lite-devel \
american-fuzzy-lop
;;
Ubuntu)
sudo apt-get update
sudo apt-get install -y \
git \
gcc \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
swig \
pcscd \
libpcsclite-dev \
afl
;;
'Arch Linux')
yes | sudo pacman --needed -S \
git \
gcc \
python3-pip \
swig \
ccid \
opensc \
afl
;;
*)
echo 'Your Linux distribution is not currently supported.'
echo 'Try manual installation.'
exit 1
;;
esac
;;
Darwin)
brew update
brew install \
git \
gcc \
python3 \
swig \
pcsc-lite \
afl-fuzz \
|| true
;;
*)
echo 'Your operating system is not currently supported.'
echo 'Try manual installation.'
exit 1
;;
esac
# install modified version of python-afl
pip3 install --user git+https://github.com/ph4r05/python-afl