This commit is contained in:
Abdoul Bah 2018-01-10 23:39:38 +01:00
parent bb9e9833c1
commit 4c83ed35ba
1 changed files with 21 additions and 21 deletions

View File

@ -323,27 +323,27 @@ pstatus()
pvulnstatus() pvulnstatus()
{ {
if [ "$opt_batch" = 1 ]; then if [ "$opt_batch" = 1 ]; then
case "$opt_batch_format" in case "$opt_batch_format" in
text) _echo 0 "$1: $2 ($3)";; text) _echo 0 "$1: $2 ($3)";;
nrpe) nrpe)
case "$2" in case "$2" in
UKN) nrpe_unknown="1";; UKN) nrpe_unknown="1";;
VULN) nrpe_critical="1"; nrpe_vuln="$nrpe_vuln $1";; VULN) nrpe_critical="1"; nrpe_vuln="$nrpe_vuln $1";;
esac esac
;; ;;
json) json)
case "$1" in case "$1" in
CVE-2017-5753) aka="SPECTRE VARIANT 1";; CVE-2017-5753) aka="SPECTRE VARIANT 1";;
CVE-2017-5715) aka="SPECTRE VARIANT 2";; CVE-2017-5715) aka="SPECTRE VARIANT 2";;
CVE-2017-5754) aka="MELTDOWN";; CVE-2017-5754) aka="MELTDOWN";;
esac esac
case "$2" in case "$2" in
UKN) is_vuln="unknown";; UKN) is_vuln="unknown";;
VULN) is_vuln="true";; VULN) is_vuln="true";;
OK) is_vuln="false";; OK) is_vuln="false";;
esac esac
json_output="${json_output:-[}{\"NAME\":\""$aka"\",\"CVE\":\""$1"\",\"VULNERABLE\":$is_vuln,\"INFOS\":\""$3"\"}," json_output="${json_output:-[}{\"NAME\":\""$aka"\",\"CVE\":\""$1"\",\"VULNERABLE\":$is_vuln,\"INFOS\":\""$3"\"},"
;; ;;
esac esac
fi fi