#!/bin/bash ### This script checks a list of CVE numbers against sarahdb for CVE in $*; do echo "CVE $CVE" echo "-----------------" echo "Matches the following advisories:" ./sarahsql.py "select distinct ref.advid, adv.severity, adv.synopsis from ref, adv where adv.advid == ref.advid and ref.reftype == 'cve' and ref.refid == '$CVE'" echo echo "Providing the following updates:" ./sarahsql.py "select distinct rpm.prodshort, rpm.filename, ref.advid from ref, rpm where rpm.advid == ref.advid and ref.reftype == 'cve' and ref.refid == '$CVE' and rpm.prodshort in ('3AS', '4AS') and rpm.arch == 'i386'" echo "-----------------" done