change yaml format

This commit is contained in:
2023-04-28 04:39:52 +02:00
parent 3d1a0ac214
commit 88edeee596
15 changed files with 483 additions and 56 deletions

17
discover Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
###
#
# Scan un réseau avec nmap pour créer un fichier de configuration
# Usage : ./discover <network> avec network en notation CIDR XXX.XXX.XXX.XXX/XX
#
###
DIR="$(dirname -- "$0")"
network="$1"
filename="${network/\//_}"
mkdir -p "$DIR/scans"
nmap -F -oX "$DIR/scans/$filename.xml" $network
mkdir -p "$DIR/configs"
xsltproc --stringparam network "$network" to_config.xsl "$DIR/scans/$filename.xml" > "$DIR/configs/$filename.yaml"