Commit 921f2b20 authored by PidgeyL's avatar PidgeyL
Browse files

mark linked items

parent 318ea5de
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -500,6 +500,12 @@ def link(vFeedMap=None,field=None,value=None):
    regex = re.compile(re.escape(value), re.I)
    cveList=[x['id'] for x in db.vfeed.find({search: regex}).sort("Modified",-1)]
    cve = list(db.cves.find({'id':{'$in': cveList}}).sort("Modified",-1))
    # marking relevant records
    cve = whitelist_mark(cve)
    cve = blacklist_mark(cve)
    seen_mark(cve)
    cve = list(cve)
    
    cvssList=[float(x['cvss']) for x in cve if 'cvss' in x]
    stats={'maxCVSS': max(cvssList), 'minCVSS': min(cvssList),'count':len(cve)}
    return render_template('linked.html', vFeedMap=vFeedMap, field=field, value=value, cve=cve, stats=stats)