diff --git a/LISEZMOI.md b/LISEZMOI.md index a8f7855..b6307b5 100644 --- a/LISEZMOI.md +++ b/LISEZMOI.md @@ -5,7 +5,7 @@ et affiche le résultat dans une page web. * Créer un fichier de configuration YAML dans un sous-dossier ./configs/ (voir l'exemple ci-dessous). Il peut être généré en scannant un réseau avec : `./discover `. -* Scanner avec le script `./scan_all` (utiliser une tâche cron !). +* Scanner avec le script `./scan_all.sh` (utiliser une tâche cron !). * Voir les résultats en ouvrant `.\index.php` dans le navigateur web. ## Exemple diff --git a/README.md b/README.md index 3b6afa2..76f6bb0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Scan hosts with `nmap` and display results in webpage. * Create a configuration yaml file in ./configs/ subdirectory (see example below). It may be generated by scanning a network with `./discover `. -* Scan with `./scan_all` (use a cron task!). +* Scan with `./scan_all.sh` (use a cron task!). * Open `.\index.php` in web browser to see results. ## Example diff --git a/discover b/discover index f44050c..7417d68 100755 --- a/discover +++ b/discover @@ -19,7 +19,7 @@ site="${network/\//_}" mkdir -p "scans" nmap -F -oX "scans/$site.xml" $network mkdir -p "configs" -xsltproc --stringparam network "$network" to_config.xsl "scans/$site.xml" > "configs/$site.yaml" -php to_XML.php "configs/$site.yaml" > "site/$site.xml" +xsltproc --stringparam network "$network" to_config.xsl "scans/$site.xml" > "configs/$site.yml" +php to_XML.php "configs/$site.yml" > "site/$site.xml" popd > /dev/null \ No newline at end of file diff --git a/scan b/scan index 53b0bae..8d948af 100755 --- a/scan +++ b/scan @@ -6,9 +6,9 @@ if [ "$#" -ne 1 ]; then fi pushd "$(dirname -- "$0")" > /dev/null -site="$(basename ${1/.yaml/})" +site="$(basename ${1/.yml/})" -php "to_XML.php" "configs/$site.yaml" > "site/$site.xml" \ +php "to_XML.php" "configs/$site.yml" > "site/$site.xml" \ && eval $(xsltproc "nmap_cmd.xsl" "site/$site.xml") \ && mv "scans/$site.xml.tmp" "scans/$site.xml" diff --git a/scan_all b/scan_all index 97d9c74..fab2255 100755 --- a/scan_all +++ b/scan_all @@ -5,11 +5,11 @@ pushd "$(dirname -- $0)" > /dev/null mkdir -p scans mkdir -p site -for config in configs/*.yaml +for config in configs/*.yml do - site="$(basename ${config/.yaml/})" + site="$(basename ${config/.yml/})" echo "Scan $site" - ./scan "$site" + ./scan.sh "$site" done popd > /dev/null diff --git a/to_XML.php b/to_XML.php index ebea4ef..d4f57af 100644 --- a/to_XML.php +++ b/to_XML.php @@ -1,6 +1,6 @@