Upload files to "/"
This commit is contained in:
1 parent
64ab35377d
commit
6dc8520fd4
1 file changed
+18
-15
@@ -1,31 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
for arg in "$@"; do
|
||||
rm nms-"$@".log
|
||||
#for arg in "$@"; do
|
||||
ts=$(date +%Y-%m-%d-%T)
|
||||
hst=$1
|
||||
#prt=$("-p $2")
|
||||
a=$@
|
||||
rm nms-"$hst".log
|
||||
clear
|
||||
echo "================================================================================" | tee nms-"$@".log
|
||||
echo "DATE: $ts" | tee -a nms-"$@".log
|
||||
echo "HOST: $@" | tee -a nms-"$@".log
|
||||
echo "--------------------------------------------------------------------------------" | tee -a nms-"$@".log
|
||||
echo "================================================================================" | tee nms-"$hst".log
|
||||
echo "DATE: $ts" | tee -a nms-"$hst".log
|
||||
echo "HOST: $hst" | tee -a nms-"$hst".log
|
||||
echo "--------------------------------------------------------------------------------" | tee -a nms-"$hst".log
|
||||
#read x
|
||||
echo "Running Nmap scan on $@..."
|
||||
nmap -Anv --script vulners,http-sql-injection,http-unsafe-output-escaping,http-enum.nse "$@" | tee -a nms-"$@".log
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo "Running Nmap scan on $hst..."
|
||||
nmap -Anv --script vulners,http-sql-injection,http-unsafe-output-escaping,http-enum.nse "$a" | tee -a nms-"$hst".log
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
echo " PRESS R FOR REPORT OR Q TO EXIT "
|
||||
echo "================================================================================"
|
||||
read -r -n 1 -s key
|
||||
if [ "$key" = "R" ] || [ "$key" = "r" ]; then
|
||||
echo "================================================================================"
|
||||
echo " GENERATING REPORT FILE: nms-"$@".pdf..."
|
||||
echo " GENERATING REPORT FILE: nms-"$hst".pdf..."
|
||||
echo "--------------------------------------------------------------------------------"
|
||||
soffice --headless --convert-to pdf --outdir ./ nms-"$@".log
|
||||
rm nms-"$@".log
|
||||
open nms-"$@".pdf
|
||||
soffice --headless --convert-to pdf --outdir ./ nms-"$hst".log
|
||||
rm nms-"$hst".log
|
||||
open nms-"$hst".pdf
|
||||
exit
|
||||
else
|
||||
if [ "$key" = "q" ] || [ "$key" = "Q" ]; then
|
||||
rm nms-"$@".log
|
||||
rm nms-"$hst".log
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
@@ -33,4 +36,4 @@ echo 'Done.'
|
||||
#read -n1
|
||||
#clear
|
||||
rm nms-"$@".log
|
||||
done
|
||||
#done
|
||||
Reference in new issue
Block a user