diff --git a/nms b/nms index f4794bb..33c3ed4 100644 --- a/nms +++ b/nms @@ -1,16 +1,16 @@ #!/bin/bash for arg in "$@"; do -rm "$@".log +rm nms-"$@".log ts=$(date +%Y-%m-%d-%T) clear -echo "================================================================================" | tee -a "$@".log -echo "DATE: $ts" | tee -a "$@".log -echo "HOST: $@" | tee -a "$@".log -echo "--------------------------------------------------------------------------------" | tee -a "$@".log +echo "================================================================================" | tee nms-"$@".log +echo "DATE: $ts" | tee -a nms-"$@".log +echo "HOST: $@" | tee -a nms-"$@".log +echo "--------------------------------------------------------------------------------" | tee -a nms-"$@".log #read x echo "Running Nmap scan on $@..." -nmap -A -v -sV -sC -Pn --script vulners,http-sql-injection,http-unsafe-output-escaping,http-enum.nse "$@" | tee -a "$@".log +nmap -A -v -sV -sC -Pn --script vulners,http-sql-injection,http-unsafe-output-escaping,http-enum.nse "$@" | tee -a nms-"$@".log echo "--------------------------------------------------------------------------------" echo " PRESS R FOR REPORT OR Q TO EXIT " echo "================================================================================" @@ -19,18 +19,18 @@ read -r -n 1 -s key echo "================================================================================" echo " GENERATING REPORT FILE: "$@".pdf..." echo "--------------------------------------------------------------------------------" - soffice --headless --convert-to pdf --outdir ./nms-"$@" "$@".log - rm "$@".log - open "$@".pdf + soffice --headless --convert-to pdf --outdir ./nms-"$@" nms-"$@".log + rm nms-"$@".log + open nms-"$@".pdf exit else if [ "$key" = "q" ] || [ "$key" = "Q" ]; then - rm "$@".log + rm nms-"$@".log exit fi fi echo 'Done.' #read -n1 #clear -rm "$@".log +rm nms-"$@".log done