コード例 #1
0
    def __init__(self, collection="cves", rankinglookup=False,
                 namelookup=False, vfeedlookup=False,
                 capeclookup=False, subscorelookup=False, reflookup=False):

        self.collectionname = collection
        self.rankinglookup = rankinglookup
        self.namelookup = namelookup
        self.vfeedlookup = vfeedlookup
        self.capeclookup = capeclookup
        self.subscorelookup = subscorelookup

        connectdb = Configuration.getMongoConnection()
        self.collection = connectdb[self.collectionname]

        if rankinglookup:
            self.ranking = connectdb['ranking']
        if namelookup:
            self.cpeOther = connectdb['cpeother']
            self.cpe = connectdb['cpe']
        if vfeedlookup:
            self.vfeed = connectdb['vfeed']
        if capeclookup:
            self.capec = connectdb['capec']
        if reflookup:
            self.ref = Configuration.getRedisRefConnection()
コード例 #2
0
    def __init__(self,
                 collection="cves",
                 rankinglookup=False,
                 namelookup=False,
                 vfeedlookup=False,
                 capeclookup=False,
                 subscorelookup=False,
                 reflookup=False):

        self.collectionname = collection
        self.rankinglookup = rankinglookup
        self.namelookup = namelookup
        self.vfeedlookup = vfeedlookup
        self.capeclookup = capeclookup
        self.subscorelookup = subscorelookup

        connectdb = Configuration.getMongoConnection()
        self.collection = connectdb[self.collectionname]

        if rankinglookup:
            self.ranking = connectdb['ranking']
        if vfeedlookup:
            self.vfeed = connectdb['vfeed']
        if capeclookup:
            self.capec = connectdb['capec']
        if reflookup:
            self.ref = Configuration.getRedisRefConnection()
コード例 #3
0
    def __init__(self, collection="cves", rankinglookup=False,
                 namelookup=False, capeclookup=False,
                 subscorelookup=False, reflookup=False):

        self.collectionname = collection
        self.rankinglookup = rankinglookup
        self.namelookup = namelookup
        self.capeclookup = capeclookup
        self.subscorelookup = subscorelookup
        self.reflookup = reflookup
        
        self.collection = collection

        if reflookup:
            self.ref = Configuration.getRedisRefConnection()
コード例 #4
0
ファイル: CVEs.py プロジェクト: slox3r/cve-search
    def __init__(self,
                 collection="cves",
                 rankinglookup=False,
                 namelookup=False,
                 capeclookup=False,
                 subscorelookup=False,
                 reflookup=False):

        self.collectionname = collection
        self.rankinglookup = rankinglookup
        self.namelookup = namelookup
        self.capeclookup = capeclookup
        self.subscorelookup = subscorelookup
        self.reflookup = reflookup

        self.collection = collection

        if reflookup:
            self.ref = Configuration.getRedisRefConnection()
コード例 #5
0
import argparse
import re
from lxml.html import fromstring
runPath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(runPath, ".."))

import zipfile
import shutil
verbose = False

from lib.Config import Configuration
import lib.DatabaseLayer as db

try:

    r = Configuration.getRedisRefConnection()
except:
    sys.exit(1)

try:
    r.info()
except:
    sys.exit("Redis server not running on %s:%s"%(Configuration.getRedisHost(),Configuration.getRedisPort()))


RefUrl = Configuration.getRefURL()
tmppath = Configuration.getTmpdir()

argparser = argparse.ArgumentParser(description='Populate/update the NIST ref database')
argparser.add_argument('-v', action='store_true', help='verbose output', default=False)
args = argparser.parse_args()
コード例 #6
0
import argparse
import re
from lxml.html import fromstring
runPath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(runPath, ".."))

import zipfile
import shutil
verbose = False

from lib.Config import Configuration
import lib.DatabaseLayer as db

try:

    r = Configuration.getRedisRefConnection()
except:
    sys.exit(1)

try:
    r.info()
except:
    sys.exit("Redis server not running on %s:%s" %
             (Configuration.getRedisHost(), Configuration.getRedisPort()))

tmppath = Configuration.getTmpdir()

argparser = argparse.ArgumentParser(
    description='Populate/update the NIST ref database')
argparser.add_argument('-v',
                       action='store_true',