2014-08-06 11:43:40 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-01-02 18:14:27 +01:00
|
|
|
# set -e
|
2014-08-06 11:43:40 +02:00
|
|
|
|
2020-08-13 15:15:08 +02:00
|
|
|
# submodules
|
|
|
|
git submodule update
|
|
|
|
|
2024-11-19 15:58:40 +01:00
|
|
|
rm -rf temp
|
|
|
|
mkdir temp
|
2014-08-06 11:43:40 +02:00
|
|
|
|
2024-11-19 15:58:40 +01:00
|
|
|
#### D3JS ####
|
|
|
|
#### TODO UPDATE ALL D3 JS to V7
|
|
|
|
wget https://d3js.org/d3.v7.min.js -O ./static/js/d3.v7.min.js
|
2024-05-28 15:50:51 +02:00
|
|
|
|
2024-11-19 15:58:40 +01:00
|
|
|
# OLD
|
2023-11-13 14:10:24 +01:00
|
|
|
D3_JS_VERSION='5.16.0'
|
2024-11-19 15:58:40 +01:00
|
|
|
wget https://github.com/d3/d3/releases/download/v${D3_JS_VERSION}/d3.zip -O temp/d3_${D3_JS_VERSION}.zip
|
|
|
|
unzip -qq temp/d3_${D3_JS_VERSION}.zip -d temp/
|
2014-08-06 11:43:40 +02:00
|
|
|
|
2024-11-19 15:58:40 +01:00
|
|
|
mv temp/d3.min.js ./static/js/
|
|
|
|
#### ####
|
2014-08-06 11:43:40 +02:00
|
|
|
|
2024-11-19 15:58:40 +01:00
|
|
|
#### FONT_AWESOME ####
|
|
|
|
FONT_AWESOME_VERSION='6.6.0'
|
2024-11-06 11:24:02 +01:00
|
|
|
wget https://github.com/FortAwesome/Font-Awesome/archive/${FONT_AWESOME_VERSION}.zip -O temp/FONT_AWESOME_${FONT_AWESOME_VERSION}.zip
|
2024-11-19 15:58:40 +01:00
|
|
|
unzip temp/FONT_AWESOME_${FONT_AWESOME_VERSION}.zip -d temp/
|
|
|
|
|
|
|
|
rm -rf ./static/webfonts/
|
|
|
|
mv temp/Font-Awesome-${FONT_AWESOME_VERSION}/css/all.min.css ./static/css/font-awesome.min.css
|
|
|
|
mv temp/Font-Awesome-${FONT_AWESOME_VERSION}/webfonts ./static/webfonts
|
|
|
|
|
|
|
|
rm -rf ./static/fonts/ ./static/font-awesome/
|
|
|
|
mv temp/font-awesome/ ./static
|
|
|
|
#### ####
|
|
|
|
|
|
|
|
BOOTSTRAP_VERSION='4.2.1'
|
|
|
|
|
|
|
|
wget https://github.com/twbs/bootstrap/releases/download/v${BOOTSTRAP_VERSION}/bootstrap-${BOOTSTRAP_VERSION}-dist.zip -O temp/bootstrap${BOOTSTRAP_VERSION}.zip
|
2018-07-05 13:58:40 +02:00
|
|
|
|
|
|
|
# dateRangePicker
|
2024-01-02 18:14:27 +01:00
|
|
|
wget https://github.com/moment/moment/archive/2.24.0.zip -O temp/moment.zip
|
|
|
|
wget https://github.com/longbill/jquery-date-range-picker/archive/v0.20.0.zip -O temp/daterangepicker.zip
|
2018-07-05 13:58:40 +02:00
|
|
|
|
2019-05-01 13:49:07 +02:00
|
|
|
unzip -qq temp/bootstrap${BOOTSTRAP_VERSION}.zip -d temp/
|
2018-07-05 13:58:40 +02:00
|
|
|
|
2020-03-04 15:12:32 +01:00
|
|
|
unzip -qq temp/moment.zip -d temp/
|
|
|
|
unzip -qq temp/daterangepicker.zip -d temp/
|
2018-07-05 13:58:40 +02:00
|
|
|
|
2019-02-07 17:22:44 +01:00
|
|
|
mv temp/bootstrap-${BOOTSTRAP_VERSION}-dist/js/bootstrap.min.js ./static/js/bootstrap4.min.js
|
2019-02-15 17:00:07 +01:00
|
|
|
mv temp/bootstrap-${BOOTSTRAP_VERSION}-dist/js/bootstrap.min.js.map ./static/js/bootstrap.min.js.map
|
2019-02-07 17:22:44 +01:00
|
|
|
mv temp/bootstrap-${BOOTSTRAP_VERSION}-dist/css/bootstrap.min.css ./static/css/bootstrap4.min.css
|
|
|
|
mv temp/bootstrap-${BOOTSTRAP_VERSION}-dist/css/bootstrap.min.css.map ./static/css/bootstrap4.min.css.map
|
2019-02-05 17:16:44 +01:00
|
|
|
|
2016-07-20 14:11:39 +02:00
|
|
|
|
|
|
|
rm -rf ./static/css/plugins/
|
2020-03-04 15:12:32 +01:00
|
|
|
mv temp/jquery-date-range-picker-0.20.0/dist/daterangepicker.min.css ./static/css/
|
2016-07-20 14:11:39 +02:00
|
|
|
|
2020-03-04 15:12:32 +01:00
|
|
|
mv temp/moment-2.24.0/min/moment.min.js ./static/js/
|
|
|
|
mv temp/jquery-date-range-picker-0.20.0/dist/jquery.daterangepicker.min.js ./static/js/
|
2018-06-29 15:52:13 +02:00
|
|
|
|
2020-03-04 15:12:32 +01:00
|
|
|
JQVERSION="3.4.1"
|
2024-01-02 18:14:27 +01:00
|
|
|
wget http://code.jquery.com/jquery-${JQVERSION}.js -O ./static/js/jquery.js
|
2014-08-06 11:43:40 +02:00
|
|
|
|
2016-07-08 09:04:19 +02:00
|
|
|
#Ressources for dataTable
|
2024-01-02 18:14:27 +01:00
|
|
|
wget https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js -O ./static/js/jquery.dataTables.min.js
|
2020-03-04 15:12:32 +01:00
|
|
|
|
2024-01-02 18:14:27 +01:00
|
|
|
wget https://cdn.datatables.net/1.10.20/css/dataTables.bootstrap4.min.css -O ./static/css/dataTables.bootstrap.min.css
|
|
|
|
wget https://cdn.datatables.net/1.10.20/js/dataTables.bootstrap4.min.js -O ./static/js/dataTables.bootstrap.min.js
|
2016-07-08 09:04:19 +02:00
|
|
|
|
2020-03-04 15:12:32 +01:00
|
|
|
#Ressources for bootstrap popover
|
2020-06-19 14:41:27 +02:00
|
|
|
POPPER_VERSION="1.16.1"
|
2024-01-02 18:14:27 +01:00
|
|
|
wget https://github.com/FezVrasta/popper.js/archive/v${POPPER_VERSION}.zip -O temp/popper.zip
|
2020-06-19 15:03:33 +02:00
|
|
|
unzip -qq temp/popper.zip -d temp/
|
2021-12-14 11:35:52 +01:00
|
|
|
mv temp/floating-ui-${POPPER_VERSION}/dist/umd/popper.min.js ./static/js/
|
|
|
|
mv temp/floating-ui-${POPPER_VERSION}/dist/umd/popper.min.js.map ./static/js/
|
2019-02-05 17:16:44 +01:00
|
|
|
|
2016-07-19 16:49:57 +02:00
|
|
|
#Ressource for graph
|
2024-11-19 15:58:40 +01:00
|
|
|
# DASHBOARD # TODO Extract from github
|
|
|
|
wget https://cdn.jsdelivr.net/npm/echarts@5.5.1/dist/echarts.min.js - O ./static/js/echarts.min.js
|
|
|
|
|
|
|
|
|
2020-06-19 15:03:33 +02:00
|
|
|
|
2020-08-12 09:28:36 +02:00
|
|
|
# INSTALL YARA
|
2023-04-20 16:05:58 +02:00
|
|
|
YARA_VERSION="4.3.0"
|
|
|
|
wget https://github.com/VirusTotal/yara/archive/v${YARA_VERSION}.zip -O temp/yara.zip
|
|
|
|
unzip temp/yara.zip -d temp/
|
2020-08-12 09:28:36 +02:00
|
|
|
pushd temp/yara-${YARA_VERSION}
|
|
|
|
./bootstrap.sh
|
2023-04-20 16:05:58 +02:00
|
|
|
./configure
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
make check
|
2020-08-12 09:28:36 +02:00
|
|
|
popd
|
|
|
|
|
2020-06-19 15:03:33 +02:00
|
|
|
|
2016-08-17 11:04:48 +02:00
|
|
|
rm -rf temp
|
2016-07-19 16:49:57 +02:00
|
|
|
|
2014-12-22 18:08:02 +01:00
|
|
|
mkdir -p ./static/image
|
2016-07-20 14:11:39 +02:00
|
|
|
pushd static/image
|
2019-05-01 13:49:07 +02:00
|
|
|
wget -q https://www.circl.lu/assets/images/logos/AIL.png -O AIL.png
|
2019-06-24 17:14:16 +02:00
|
|
|
wget -q https://www.circl.lu/assets/images/logos/AIL-logo.png -O AIL-logo.png
|
2016-07-20 14:11:39 +02:00
|
|
|
popd
|
2018-05-31 10:07:23 +02:00
|
|
|
|
2019-04-02 09:50:52 +02:00
|
|
|
if ! [[ -n "$AIL_HOME" ]]
|
|
|
|
then
|
|
|
|
#active virtualenv
|
|
|
|
source ./../../AILENV/bin/activate
|
|
|
|
fi
|
|
|
|
|
2018-06-19 11:31:30 +02:00
|
|
|
#Update PyMISP
|
2024-01-02 18:14:27 +01:00
|
|
|
pip3 install pymisp --upgrade
|
2018-06-19 11:31:30 +02:00
|
|
|
|