This repository has been archived on 2025-02-13. You can view files and clone it, but cannot push or open issues or pull requests.
lanScan2/scan
2023-04-29 08:25:51 +02:00

15 lines
337 B
Bash
Executable File

#!/usr/bin/env bash
if [ "$#" -ne 1 ]; then
echo "Usage: ./scan <config>" >&2
exit 1
fi
pushd "$(dirname -- "$0")" > /dev/null
site="$(basename ${1/.yaml/})"
php "to_XML.php" "configs/$site.yaml" > "site/$site.xml"
eval $(xsltproc "nmap_cmd.xsl" "site/$site.xml")
mv "scans/$site.xml.tmp" "scans/$site.xml"
popd > /dev/null