made the nmap script work

This commit is contained in:
2025-05-15 13:19:06 -06:00
parent 167d3b2b55
commit ea153760ce
3 changed files with 29 additions and 16 deletions
Executable
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
scansPath="/var/www/html/nmap-scans"
fileName="nmap-$(date +%Y%m%d-%H%M%S).xml"
filePath="$scansPath/$fileName"
webPath="http://10.0.0.51/nmap-scans/$fileName"
cmd="nmap -oX \"$filePath\" --stylesheet \"/nmaprincesspi/xsl/princesspi-nmap.xsl\" $*"
echo -e "\nRunning: $cmd"
echo -e "Report Saving to: $webPath\n\n"
eval "$cmd"
echo -e "Done!\n\nReport Visible at $webPath\n\n"