#!/usr/local/bin/bash -x
TARGET1=/data/stuff/target.txt
TRACE=/usr/local/bin/nessus
RANDOM=$$$(date %+s)
function d20 () {
d=$[ ( $RANDOM % 20 ) + 1 ]
}
results=$RANDOM
results=$REMOTE_ADDR
TOPSTUFF='Content-type: text/html
Nessus/ Scan
'
#if [ -x /data/stuff/target.txt ]; then
if [ $# = 0 ]; then
echo "$TOPSTUFF"
echo "
STOP SNORT ON THIS SERVER FIRST !!
"
echo "Rmccurdy.com free Nessus/Scan 2.1
"
echo "Nessus is the world's most popular vulnerability scanner used in over 75,000 organizations world-wide. Many of the world's largest organizations are realizing significant cost savings by using Nessus to audit business-critical enterprise devices and applications."
echo "To perform a Nessus scan from this site, enter the desired destination host.domain or IP address."
echo "REMOTE ADDRESS is " $REMOTE_ADDR "
"
echo "WARNING: The nessus scan will run in safe check mode OFF. This option disables the dangerous script that may kill the system or some service. Nessus then relies upon the version numbers in banners, for example. If no clue is available, the test is simply dropped.
Scan can take upto 10-60 min depending on speed and services running on the host
"
else
echo "$TOPSTUFF"
echo "$*" > /data/stuff/target.txt
results=`cat /data/stuff/target.txt`
echo " DO NOT CLOSE THIS WINDOW !
scan may take 10-30 minutes !!!"
echo "Results link will be posted here
"
echo "http://rmccurdy.com/stuff/"$results"_nessus.html
"
# nessus1
echo "
Please wait loading Nessus...
"
echo "
The scan will start in about 3min
"
#/usr/local/bin/nessus -q -T html -V localhost 1241 dinix foamy /data/stuff/target.txt /data/stuff/"$results"_nessus.html
/usr/bin/killall screen
/usr/local/bin/screen -dmS eval
/usr/local/bin/screen -X eval "screen /usr/local/bin/nessus -q -T html -V localhost 1241 dinix foamy /data/stuff/target.txt /data/stuff/"$results"_nessus.html"
echo "running test"
fi
#else
#echo "$TOPSTUFF"
#echo "Scan in progress please try again latter"
#echo "Nessus var is" $nessusvar "."
#echo $nessusvar
#fi