mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-23 06:37:15 +00:00
taxonomies and galaxies update via LAUNCH
This commit is contained in:
parent
5c50de45de
commit
884d655b0c
4 changed files with 22 additions and 20 deletions
|
@ -232,7 +232,7 @@ islogged=`screen -ls | egrep '[0-9]+.Logging_AIL' | cut -d. -f1`
|
||||||
isqueued=`screen -ls | egrep '[0-9]+.Queue_AIL' | cut -d. -f1`
|
isqueued=`screen -ls | egrep '[0-9]+.Queue_AIL' | cut -d. -f1`
|
||||||
isscripted=`screen -ls | egrep '[0-9]+.Script_AIL' | cut -d. -f1`
|
isscripted=`screen -ls | egrep '[0-9]+.Script_AIL' | cut -d. -f1`
|
||||||
|
|
||||||
options=("Redis" "Ardb" "Logs" "Queues" "Scripts" "Killall" "Shutdown" "Update-config")
|
options=("Redis" "Ardb" "Logs" "Queues" "Scripts" "Killall" "Shutdown" "Update-config" "Update-thirdparty")
|
||||||
|
|
||||||
menu() {
|
menu() {
|
||||||
echo "What do you want to Launch?:"
|
echo "What do you want to Launch?:"
|
||||||
|
@ -332,6 +332,17 @@ for i in ${!options[@]}; do
|
||||||
echo -e $GREEN"\t* Configuration up-to-date"$DEFAULT
|
echo -e $GREEN"\t* Configuration up-to-date"$DEFAULT
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
Update-thirdparty)
|
||||||
|
echo -e "\t* Updating thirdparty..."
|
||||||
|
bash -c "(cd ../var/www && ./update_thirdparty.sh)"
|
||||||
|
exitStatus=$?
|
||||||
|
if [ $exitStatus -ge 1 ]; then
|
||||||
|
echo -e $RED"\t* Configuration not up-to-date"$DEFAULT
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
echo -e $GREEN"\t* Configuration up-to-date"$DEFAULT
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -70,10 +70,6 @@ if [ ! -f bin/packages/config.cfg ]; then
|
||||||
cp bin/packages/config.cfg.sample bin/packages/config.cfg
|
cp bin/packages/config.cfg.sample bin/packages/config.cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd var/www/
|
|
||||||
sudo ./update_thirdparty.sh
|
|
||||||
popd
|
|
||||||
|
|
||||||
if [ -z "$VIRTUAL_ENV" ]; then
|
if [ -z "$VIRTUAL_ENV" ]; then
|
||||||
|
|
||||||
virtualenv -p python3 AILENV
|
virtualenv -p python3 AILENV
|
||||||
|
@ -88,6 +84,10 @@ if [ -z "$VIRTUAL_ENV" ]; then
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pushd var/www/
|
||||||
|
./update_thirdparty.sh
|
||||||
|
popd
|
||||||
|
|
||||||
year1=20`date +%y`
|
year1=20`date +%y`
|
||||||
year2=20`date --date='-1 year' +%y`
|
year2=20`date --date='-1 year' +%y`
|
||||||
mkdir -p $AIL_HOME/{PASTES,Blooms,dumps}
|
mkdir -p $AIL_HOME/{PASTES,Blooms,dumps}
|
||||||
|
@ -95,11 +95,6 @@ mkdir -p $AIL_HOME/{PASTES,Blooms,dumps}
|
||||||
pip3 install -U pip
|
pip3 install -U pip
|
||||||
pip3 install -U -r pip3_packages_requirement.txt
|
pip3 install -U -r pip3_packages_requirement.txt
|
||||||
|
|
||||||
#MISP PyTaxonomies
|
|
||||||
pip3 install -U git+https://github.com/MISP/PyTaxonomies
|
|
||||||
#MISP PyMISPGalaxies
|
|
||||||
pip3 install -U git+https://github.com/MISP/PyMISPGalaxies
|
|
||||||
|
|
||||||
# Pyfaup
|
# Pyfaup
|
||||||
pushd faup/src/lib/bindings/python/
|
pushd faup/src/lib/bindings/python/
|
||||||
python3 setup.py install
|
python3 setup.py install
|
||||||
|
@ -107,8 +102,6 @@ popd
|
||||||
|
|
||||||
# Py tlsh
|
# Py tlsh
|
||||||
pushd tlsh/py_ext
|
pushd tlsh/py_ext
|
||||||
#python setup.py build
|
|
||||||
#python setup.py install
|
|
||||||
python3 setup.py build
|
python3 setup.py build
|
||||||
python3 setup.py install
|
python3 setup.py install
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import redis
|
||||||
from flask import Flask, render_template, jsonify, request, Blueprint, redirect, url_for
|
from flask import Flask, render_template, jsonify, request, Blueprint, redirect, url_for
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
import Paste
|
import Paste
|
||||||
|
|
||||||
|
@ -200,8 +201,8 @@ def get_tagged_paste():
|
||||||
else :
|
else :
|
||||||
return 'INCORRECT INPUT'
|
return 'INCORRECT INPUT'
|
||||||
|
|
||||||
#currentSelectYear = int(datetime.now().year)
|
#TODO FIXME
|
||||||
currentSelectYear = 2018
|
currentSelectYear = int(datetime.now().year)
|
||||||
|
|
||||||
bootstrap_label = []
|
bootstrap_label = []
|
||||||
bootstrap_label.append('primary')
|
bootstrap_label.append('primary')
|
||||||
|
@ -553,9 +554,6 @@ def galaxies():
|
||||||
icon.append(galaxie['icon'])
|
icon.append(galaxie['icon'])
|
||||||
version.append(galaxie['version'])
|
version.append(galaxie['version'])
|
||||||
type = galaxie['type']
|
type = galaxie['type']
|
||||||
# FIXME remove this
|
|
||||||
if type == 'mitre-pre-attack-relashipship':
|
|
||||||
type = 'mitre-pre-attack-relationship'
|
|
||||||
all_type.append(type)
|
all_type.append(type)
|
||||||
namespace.append(galaxie['namespace'])
|
namespace.append(galaxie['namespace'])
|
||||||
description.append(galaxie['description'])
|
description.append(galaxie['description'])
|
||||||
|
|
|
@ -66,7 +66,7 @@ wget https://www.circl.lu/assets/images/logos/AIL.png -O AIL.png
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#active virtualenv
|
#active virtualenv
|
||||||
. ./../../AILENV/bin/activate
|
source ./../../AILENV/bin/activate
|
||||||
#Update MISP Taxonomies and Galaxies
|
#Update MISP Taxonomies and Galaxies
|
||||||
pip3 install --upgrade git+https://github.com/MISP/PyTaxonomies
|
python3 -m pip install git+https://github.com/MISP/PyTaxonomies
|
||||||
pip3 install --upgrade git+https://github.com/MISP/PyMISPGalaxies
|
python3 -m pip install --upgrade git+https://github.com/MISP/PyMISPGalaxies
|
||||||
|
|
Loading…
Reference in a new issue