Greetings

I know more about how dash handles conditions than I ever wanted to know.

<snip>
#!/bin/sh
# 2014-09-25 10:35:11 pflint
# SOURCE:http://blogs.splunk.com/2014/09/24/finding-shellshock-cve-2014-6271-with-splunk-forwarders/
#
HOSTNAME=$(/bin/hostname)
RUNNING=$(/bin/date)
THECHECK=$(env='() { :;}; echo status=VULNERABLE' bash -c "ls -al /bin/bash" 2>&1 /dev/null) #echo $THECHECK if [ "$(echo $THECHECK |grep VUL)" ] ; then echo "$RUNNING hostname=$HOSTNAME cve=2014-6271 status=VULNERABLE"; else echo "$RUNNING hostname=$HOSTNAME cve=2014-6271 status=NOTVULNERABLE"; fi
<snap>

See http://docbox.flint.com:8081/visual.bash#ssschk.sh for proper spacing...

Kindest Regards,



Paul Flint
(802) 479-2360 Home
(802) 595-9365 Cell

/************************************
Based upon email reliability concerns,
please send an acknowledgement in response to this note.

Paul Flint
17 Averill Street
Barre, VT
05641

Reply via email to