Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2014-09-22 06:07:46 +0400
committermboelen <michael@cisofy.com>2014-09-22 06:07:46 +0400
commit20068381447ea56b07235e74734489108ce793d3 (patch)
tree584d5b9c2009535adc9e2eb4348a42dcc33657cf
parent595f84ae452459694ae9625baac014d117b441ae (diff)
Added drill binary to list to determine latest version
-rw-r--r--include/functions11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/functions b/include/functions
index 7bef6120..027933d3 100644
--- a/include/functions
+++ b/include/functions
@@ -115,6 +115,7 @@
{
# Possible improvement: determine if host binary exists YYY
PROGRAM_LV="0000000000"; DB_MALWARE_LV="0000000000"; DB_FILEPERMS_LV="0000000000"
+ LYNIS_LV_RECORD="lynis-lv.rootkit.nl."
FIND=`which dig 2> /dev/null`
if [ ! "${FIND}" = "" ]; then
PROGRAM_LV=`dig +short +time=3 -t txt lynis-lv.rootkit.nl 2> /dev/null | grep -v "connection timed out" | sed 's/[".]//g'`
@@ -126,8 +127,14 @@
PROGRAM_LV=`host -t txt -W 3 lynis-lv.rootkit.nl 2> /dev/null | grep -v "connection timed out" | awk '{ if ($1=="lynis-lv.rootkit.nl" && $3=="text") { print $4 }}' | sed 's/"//g'`
if [ "${PROGRAM_LV}" = "" ]; then PROGRAM_LV=0; fi
else
- logtext "Result: dig and host not installed, update check skipped"
- UPDATE_CHECK_SKIPPED=1
+ FIND=`which drill 2> /dev/null`
+ if [ ! "${FIND}" = "" ]; then
+ PROGRAM_LV=`drill txt ${LYNIS_LV_RECORD} | awk '{ if ($1=="lynis-lv.rootkit.nl." && $4=="TXT") { print $5 }}' | tr -d '"'`
+ if [ "${PROGRAM_LV}" = "" ]; then PROGRAM_LV=0; fi
+ else
+ logtext "Result: dig, drill or host not installed, update check skipped"
+ UPDATE_CHECK_SKIPPED=1
+ fi
fi
fi
}