forked from jgamblin/CarHackingTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
toolinstall.sh
280 lines (242 loc) · 6.28 KB
/
toolinstall.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
#!/bin/bash
# Ubuntu Car Hacking Workstation Setup
# TODO: General CLean Up.
set -e
# Setup Tools Directory
sudo mkdir -p /tools
sudo chmod -R 0777 /tools
cd /tools || exit
# Add user to dialout so USB-to-Serial Works-ish.
sudo usermod -a -G dialout "$USER"
# Update System
sudo DEBIAN_FRONTEND=noninteractive apt-get update -y
sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
# Java Fixes
sudo add-apt-repository -y ppa:linuxuprising/java
echo debconf shared/accepted-oracle-license-v1-2 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-2 seen true | sudo debconf-set-selections
#Base Package Install (Packages Listed Invidually For Easy Customazation/Trobule Shooting.)
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
aircrack-ng \
ant \
arduino \
arduino-core \
autoconf \
automake \
bison \
blueman \
bluetooth \
bluez \
bluez-tools \
btscanner \
build-essential \
can-utils \
cpp \
cryptsetup \
curl \
ess \
flex \
gcc \
git \
gnuradio \
gqrx-sdr \
htop \
jq \
libavcodec-dev \
libavformat-dev \
libbluetooth-dev \
libconfig-dev \
libgps-dev \
libgtk-3-dev \
libportmidi-dev \
libsdl2-dev \
libsdl2-image-dev \
libsdl2-mixer-dev \
libsdl2-ttf-dev \
libsqlite3-dev \
libswscale-dev \
libtool \
maven \
moserial \
net-tools \
netbeans \
npm \
oracle-java15-installer \
oracle-java15-set-default \
python \
python-dev \
python3-dev \
python3-pip \
python3-serial \
python-wxtools \
ruby \
ruby-dev \
software-properties-common \
sqlite \
tree \
tree \
tshark \
unrar \
unzip \
wget \
wireshark \
zlib1g-dev
# Starting Car Hacking Tool Installation
printf "Instaling Tools"
printf "\\n"
# Bluelog
# Read The Docs: https://github.com/MS3FGX/Bluelog
git clone https://github.com/MS3FGX/Bluelog.git
cd Bluelog || exit
sudo make install
cd .. || exit
# Can-Utils:
# Read The Docs: https://github.com/linux-can/can-utils
# More Reading: # More Reading: https://discuss.cantact.io/t/using-can-utils/24
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y can-utils
# Canbus-utils
# Read The Docs Here: https://github.com/digitalbond/canbus-utils
# More Reading: http://www.digitalbond.com/blog/2015/03/05/tool-release-digital-bond-canbus-utils/
git clone https://github.com/digitalbond/canbus-utils
cd canbus-utils || exit
npm install
cd .. || exit
# Cantact-App
# Read The Docs Here: https://github.com/linklayer/cantact-app/
mkdir -p cantact-app
cd cantact-app || exit
wget https://github.com/linklayer/cantact-app/releases/download/v0.3.0-alpha/cantact-v0.3.0-alpha.zip
sudo unzip cantact-v0.3.0-alpha.zip
sudo rm cantact-v0.3.0-alpha.zip
cd .. || exit
# Caringcaribou
# Read The Docs Here: https://github.com/CaringCaribou/caringcaribou
pip3 install --user python-can
git clone https://github.com/CaringCaribou/caringcaribou
# c0f
# Read the Docs Here: https://github.com/zombieCraig/c0f
sudo gem install c0f
# ICSim
# Read The Docs Here: https://github.com/zombieCraig/ICSim
# Quick Start: ./setup_vcan.sh && ./icsim vcan0 && ./controls vcan0
git clone https://github.com/zombieCraig/ICSim.git
# KatyOBD
# Read The Docs Here:
git clone https://github.com/YangChuan80/KatyOBD
#Fix Typo in KatyOBD
cd KatyOBD || exit
sed -i 's/tkinter/Tkinter/g' KatyOBD.py
cd .. || exit
# Kayak
# Read The Docs Here: http://kayak.2codeornot2code.org/
# To Install ./Kayak-1.0-SNAPSHOT-linux.sh --silent
mkdir -p -p kayak
cd kayak || exit
curl http://kayak.2codeornot2code.org/Kayak-1.0-SNAPSHOT-linux.sh > Kayak-1.0-SNAPSHOT-linux.sh
chmod +x Kayak-1.0-SNAPSHOT-linux.sh
cd .. || exit
# OBD-Monitor
git clone https://github.com/dchad/OBD-Monitor
cd OBD-Monitor || exit
cd src|| exit
make stests
make server
make ftests
cd .. || exit
cd .. || exit
# Python-ODB
# Read The Docs Here: https://python-obd.readthedocs.io/en/latest/
pip3 install --user pySerial
pip3 install --user obd
# Scantool
# Read The Docs Here: https://samhobbs.co.uk/2015/04/scantool-obdii-car-diagnostic-software-linux
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y scantool
# UDSim
# Read The Docs Here: https://github.com/zombieCraig/UDSim
git clone https://github.com/zombieCraig/UDSim
cd UDSim/src || exit
make
cd .. || exit
cd .. || exit
# Make Desktop Icons
printf "Configuring Desktop Icons"
printf "\\n"
mkdir -p -p icons
cd icons || exit
cat << EOF > BlueLog.desktop
[Desktop Entry]
Name=BlueLog
Type=Application
Path=/tools/Bluelog
Exec=/tools/Bluelog/bluelog
Icon=/tools/Bluelog/www/images/bluelog_logo.png
Terminal=true
Categories=Utility
StartupNotify=false
EOF
wget https://play-lh.googleusercontent.com/HaPn8O7TNLTDN5PbPw-Gd1aq3mvTfrudkh9ov3DqNQebQ8a5HVTaNxXsgMXWXY-TAA -O cantact.png
cat << EOF > Cantact.desktop
[Desktop Entry]
Name=Cantact
Type=Application
Path=/tools/cantact-app/cantact/bin
Exec=sudo -H /tools/cantact-app/cantact/bin/cantact
Icon=/tools/icons/cantact.png
Terminal=true
Categories=Utility
StartupNotify=false
EOF
wget https://icon2.cleanpng.com/20180421/uue/kisspng-car-speedometer-computer-icons-odometer-dashboard-speedometer-background-5adabbb1c097f5.1976244315242843377889.jpg -O icsim.jpg
cat << EOF > ICSim.desktop
[Desktop Entry]
Name=ICSim
Type=Application
Path=/tools/ICSim/
Exec=/tools/ICSim/icsim vcan0
Icon=/tools/icons/icsim.jpg
Terminal=true
Categories=Utility
StartupNotify=false
EOF
cat << EOF > ICSimControls.desktop
[Desktop Entry]
Name=ICSim Controls
Type=Application
Path=/tools/ICSim/
Exec=/tools/ICSim/controls vcan0
Icon=/tools/icons/icsim.jpg
Terminal=true
Categories=Utility
StartupNotify=false
EOF
wget http://www.vhv.rs/dpng/d/457-4576489_kayak-white-kayak-icon-png-transparent-png.png -O kayak.png
cat << EOF > KayakInstall.desktop
[Desktop Entry]
Name=Kayak Install
Type=Application
Path=/tools/kayak
Exec=/tools/kayak/Kayak-1.0-SNAPSHOT-linux.sh
Icon=/tools/icons/kayak.png
Terminal=true
Categories=Utility
StartupNotify=false
EOF
wget https://icon2.cleanpng.com/20180421/uue/kisspng-car-speedometer-computer-icons-odometer-dashboard-speedometer-background-5adabbb1c097f5.1976244315242843377889.jpg -O KatyOBD.jpg
cat << EOF > KatyOBD.desktop
[Desktop Entry]
Name=KatyOBD
Type=Application
Path=/tools/KatyOBD
Exec=sudo -H python KatyOBD.py
Icon=/tools/icons/KatyOBD.jpg
Terminal=true
Categories=Utility
StartupNotify=false
EOF
sleep 15
sudo chmod 755 ./*.desktop
cp ./*.desktop ~/.local/share/applications
cd .. || exit
cd ~/.local/share/applications || exit
sudo chmod 755 ./*.desktop
cd .. || exit