Commit 1429d6e2 authored by PidgeyL's avatar PidgeyL
Browse files

add cpe 2.3 to 2.2 to api

parent 91fae040
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ import logging
from logging.handlers import RotatingFileHandler

from lib.Config import Configuration
from lib.Toolkit import toStringFormattedCPE
from lib.Toolkit import toStringFormattedCPE, toOldCPE
import lib.CVEs as cves

# parse command line arguments
@@ -229,6 +229,12 @@ def cpe23(cpe):
    if not cpe: cpe='None'
    return cpe

@app.route('/api/cpe2.2/<path:cpe>', methods=['GET'])
def cpe22(cpe):
    cpe = toOldCPE(cpe)
    if not cpe: cpe='None'
    return cpe

@app.route('/api/cvefor/<path:cpe>', methods=['GET'])
def apiCVEFor(cpe):
    col = db['cves']