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`
|
||||
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() {
|
||||
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
|
||||
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
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -70,10 +70,6 @@ if [ ! -f bin/packages/config.cfg ]; then
|
|||
cp bin/packages/config.cfg.sample bin/packages/config.cfg
|
||||
fi
|
||||
|
||||
pushd var/www/
|
||||
sudo ./update_thirdparty.sh
|
||||
popd
|
||||
|
||||
if [ -z "$VIRTUAL_ENV" ]; then
|
||||
|
||||
virtualenv -p python3 AILENV
|
||||
|
@ -88,6 +84,10 @@ if [ -z "$VIRTUAL_ENV" ]; then
|
|||
|
||||
fi
|
||||
|
||||
pushd var/www/
|
||||
./update_thirdparty.sh
|
||||
popd
|
||||
|
||||
year1=20`date +%y`
|
||||
year2=20`date --date='-1 year' +%y`
|
||||
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 -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
|
||||
pushd faup/src/lib/bindings/python/
|
||||
python3 setup.py install
|
||||
|
@ -107,8 +102,6 @@ popd
|
|||
|
||||
# Py tlsh
|
||||
pushd tlsh/py_ext
|
||||
#python setup.py build
|
||||
#python setup.py install
|
||||
python3 setup.py build
|
||||
python3 setup.py install
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import redis
|
|||
from flask import Flask, render_template, jsonify, request, Blueprint, redirect, url_for
|
||||
|
||||
import json
|
||||
from datetime import datetime
|
||||
|
||||
import Paste
|
||||
|
||||
|
@ -200,8 +201,8 @@ def get_tagged_paste():
|
|||
else :
|
||||
return 'INCORRECT INPUT'
|
||||
|
||||
#currentSelectYear = int(datetime.now().year)
|
||||
currentSelectYear = 2018
|
||||
#TODO FIXME
|
||||
currentSelectYear = int(datetime.now().year)
|
||||
|
||||
bootstrap_label = []
|
||||
bootstrap_label.append('primary')
|
||||
|
@ -553,9 +554,6 @@ def galaxies():
|
|||
icon.append(galaxie['icon'])
|
||||
version.append(galaxie['version'])
|
||||
type = galaxie['type']
|
||||
# FIXME remove this
|
||||
if type == 'mitre-pre-attack-relashipship':
|
||||
type = 'mitre-pre-attack-relationship'
|
||||
all_type.append(type)
|
||||
namespace.append(galaxie['namespace'])
|
||||
description.append(galaxie['description'])
|
||||
|
|
|
@ -66,7 +66,7 @@ wget https://www.circl.lu/assets/images/logos/AIL.png -O AIL.png
|
|||
popd
|
||||
|
||||
#active virtualenv
|
||||
. ./../../AILENV/bin/activate
|
||||
source ./../../AILENV/bin/activate
|
||||
#Update MISP Taxonomies and Galaxies
|
||||
pip3 install --upgrade git+https://github.com/MISP/PyTaxonomies
|
||||
pip3 install --upgrade git+https://github.com/MISP/PyMISPGalaxies
|
||||
python3 -m pip install git+https://github.com/MISP/PyTaxonomies
|
||||
python3 -m pip install --upgrade git+https://github.com/MISP/PyMISPGalaxies
|
||||
|
|
Loading…
Reference in a new issue