mirror of https://github.com/MISP/misp-book
new: [doc] Added script to generate galaxy section from repo
parent
0ad440c58c
commit
f554f50058
|
@ -68,6 +68,8 @@ Clicking on the addition symbol on the left of Beijing Group extends the module.
|
||||||
|
|
||||||
### Available Galaxies
|
### Available Galaxies
|
||||||
|
|
||||||
|
<!-- NB. This list is generated dynamically with gen-doc.sh included in this directory. -->
|
||||||
|
|
||||||
#### Clusters
|
#### Clusters
|
||||||
|
|
||||||
[Android](https://github.com/MISP/misp-galaxy/blob/master/clusters/android.json) - Android malware galaxy based on multiple open sources.
|
[Android](https://github.com/MISP/misp-galaxy/blob/master/clusters/android.json) - Android malware galaxy based on multiple open sources.
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# This generates some of the sections of the Galaxy Documentation
|
||||||
|
# Dependencies: git, jq, bash
|
||||||
|
|
||||||
|
if [[ ! -d "misp-galaxy" ]]; then
|
||||||
|
git clone https://github.com/MISP/misp-galaxy.git
|
||||||
|
cd misp-galaxy
|
||||||
|
else
|
||||||
|
cd misp-galaxy
|
||||||
|
git pull
|
||||||
|
fi
|
||||||
|
|
||||||
|
FOLDERS='clusters vocabularies/common vocabularies/threat-actor'
|
||||||
|
|
||||||
|
for folder in ${FOLDERS}; do
|
||||||
|
cd $folder
|
||||||
|
|
||||||
|
for file in $(ls |grep -v README); do
|
||||||
|
Name=$(echo ${file} |cut -f 1 -d.| tr '-' ' '| tr '_' ' ')
|
||||||
|
Name=$(tr '[:lower:]' '[:upper:]' <<< ${Name:0:1})${Name:1}
|
||||||
|
Description=$(jq -r .description ${file})
|
||||||
|
|
||||||
|
echo "[${Name}](https://github.com/MISP/misp-galaxy/blob/master/${folder}/${file}) - ${Description}"
|
||||||
|
echo ""
|
||||||
|
done
|
||||||
|
echo "------------------------------------------------------------------------------------"
|
||||||
|
echo "$folder done"
|
||||||
|
echo "------------------------------------------------------------------------------------"
|
||||||
|
# This is ugly, but works... fix it if you do not like it.
|
||||||
|
if [[ $folder == *'/'* ]]; then
|
||||||
|
cd ../..
|
||||||
|
else
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
done
|
Loading…
Reference in New Issue