Exemplo n.º 1
0
 def last(self, entries=None):
     if self.apiurl:
         url = "api/last"
         if entries:
             url = "%s/%s" % (url, str(entries))
         cves = self._query(url)
         return cves and [CVE.fromDict(x) for x in cves] or cves
     return self.api.api_last(entries)[0]
Exemplo n.º 2
0
 def cve(self, cveid):
     if self.apiurl:
         cve = self._query("api/cve/%s" % str(cveid))
         return cve and CVE.fromDict(cve) or None
     try:
         return self.api.api_cve(cveid)
     except:
         return None
Exemplo n.º 3
0
 def cveforcpe(self, cpe):
     if self.apiurl:
         cpes = self._query("api/cvefor/%s" % str(cpe))
         return cpes and [CVE.fromDict(x) for x in cpes] or cpes
     return self.api.api_cvesFor(cpe)