Commit 1cbf650a authored by Alexandre Dulaunoy's avatar Alexandre Dulaunoy
Browse files

Handle exploit definition without ref element to fix #129

XML document of d2sec can have exploit without any reference.
parent f65f75a7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ class ExploitHandler(ContentHandler):
                    self.cveref = ""
                elif self.reftype != 'CVE' :
                    self.refcvetag = False
                    self.cveref = False

    def characters(self, ch):
        if self.nametag:
@@ -71,7 +72,7 @@ class ExploitHandler(ContentHandler):

    def endElement(self, name):
        if name == 'ref':
            if self.cveref != "":
            if self.cveref != "" and self.cveref:
                self.refl.append(self.cveref.rstrip())
            self.reftag = False
        if name == 'name':