Commit f88eb214 authored by PidgeyL's avatar PidgeyL
Browse files

include vfeed info to cvesfor, allowing tools using the api more options

parent 52bd910e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -370,9 +370,9 @@ def apiCVEFor(cpe):
    if not cpe: cpe='None'
    vulns = col.find({"vulnerable_configuration": {'$regex': cpe}}).sort("Modified", -1)
    r = []
    cvesp = cves.last(rankinglookup=False, namelookup=False, vfeedlookup=True, capeclookup=False)
    for x in vulns:
        x.pop('_id')
        r.append(x)
        r.append(cvesp.getcve(x['id']))
    return json.dumps(r)

@app.route('/api/cve/<cveid>', methods=['GET'])
@@ -831,8 +831,8 @@ if __name__ == '__main__':
    # logging
    if Configuration.getLogging():
        logfile = Configuration.getLogfile()
        pathToLog = logfile.rsplit('/', 1)[0]
        pathToLog = os.path.join(_runPath, pathToLog)
        pathToLog = os.path.join(_runPath, logfile.rsplit('/', 1)[0])
        #pathToLog = os.path.join(_runPath, pathToLog)
        logfile = os.path.join(_runPath, logfile)
        if not os.path.exists(pathToLog):
            os.makedirs(pathToLog)
+2 −2
Original line number Diff line number Diff line
@@ -216,9 +216,9 @@ def apiCVEFor(cpe):
    if not cpe: cpe='None'
    vulns = col.find({"vulnerable_configuration": {'$regex': cpe}}).sort("Modified", -1)
    r = []
    cvesp = cves.last(rankinglookup=False, namelookup=False, vfeedlookup=True, capeclookup=False)
    for x in vulns:
        x.pop('_id')
        r.append(x)
        r.append(cvesp.getcve(x['id']))
    return json.dumps(r)

@app.route('/api/cve/<cveid>', methods=['GET'])