Commit d9b82c44 authored by Alexandre Dulaunoy's avatar Alexandre Dulaunoy
Browse files

Merge pull request #85 from PidgeyL/master

vFeed info in cvesfor
parents 5205dbc6 82f7f385
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -407,9 +407,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'])
@@ -890,8 +890,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
@@ -215,9 +215,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'])