Update nms

This commit is contained in:
2026-08-25 01:00:41 +00:00
parent cbae46fe3c
commit 140f4ebc19
+11 -11
View File
@@ -1,16 +1,16 @@
#!/bin/bash #!/bin/bash
for arg in "$@"; do for arg in "$@"; do
rm "$@".log rm nms-"$@".log
ts=$(date +%Y-%m-%d-%T) ts=$(date +%Y-%m-%d-%T)
clear clear
echo "================================================================================" | tee -a "$@".log echo "================================================================================" | tee nms-"$@".log
echo "DATE: $ts" | tee -a "$@".log echo "DATE: $ts" | tee -a nms-"$@".log
echo "HOST: $@" | tee -a "$@".log echo "HOST: $@" | tee -a nms-"$@".log
echo "--------------------------------------------------------------------------------" | tee -a "$@".log echo "--------------------------------------------------------------------------------" | tee -a nms-"$@".log
#read x #read x
echo "Running Nmap scan on $@..." 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 "--------------------------------------------------------------------------------"
echo " PRESS R FOR REPORT OR Q TO EXIT " echo " PRESS R FOR REPORT OR Q TO EXIT "
echo "================================================================================" echo "================================================================================"
@@ -19,18 +19,18 @@ read -r -n 1 -s key
echo "================================================================================" echo "================================================================================"
echo " GENERATING REPORT FILE: "$@".pdf..." echo " GENERATING REPORT FILE: "$@".pdf..."
echo "--------------------------------------------------------------------------------" echo "--------------------------------------------------------------------------------"
soffice --headless --convert-to pdf --outdir ./nms-"$@" "$@".log soffice --headless --convert-to pdf --outdir ./nms-"$@" nms-"$@".log
rm "$@".log rm nms-"$@".log
open "$@".pdf open nms-"$@".pdf
exit exit
else else
if [ "$key" = "q" ] || [ "$key" = "Q" ]; then if [ "$key" = "q" ] || [ "$key" = "Q" ]; then
rm "$@".log rm nms-"$@".log
exit exit
fi fi
fi fi
echo 'Done.' echo 'Done.'
#read -n1 #read -n1
#clear #clear
rm "$@".log rm nms-"$@".log
done done