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