コード例 #1
0
ファイル: IAVM.py プロジェクト: pombredanne/cyberxml-django
def getCpeFromCve(cve):
    cpes=[]
    try:
        vendor_cpes=microsoft.getCpeFromCve(cve)
        if len(vendor_cpes)>0:
            cpes=cpes+[["microsoft.com",vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes=oracle.getCpeFromCve(cve)
        if len(vendor_cpes)>0:
            cpes=cpes+[["oracle.com",vendor_cpes]]
    except:
        pass
    try:
        # OVAL more accurate, too slow
        #vendor_cpes=redhat.getCpeFromCveOval(cve)
        vendor_cpes=redhat.getCpeFromCve(cve)
        if len(vendor_cpes)>0:
            cpes=cpes+[["redhat.com",vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes=adobe.getCpeFromCve(cve)
        if len(vendor_cpes)>0:
            cpes=cpes+[["adobe.com",vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes=vmware.getCpeFromCve(cve)
        if len(vendor_cpes)>0:
            cpes=cpes+[["vmware.com",vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes=vmware.getCpeFromCve(cve)
        if len(vendor_cpes)>0:
            cpes=cpes+[["wireshark.org",vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes=cisco.getCpeFromCve(cve)
        if len(vendor_cpes)>0:
            cpes=cpes+[["cisco.com",vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes=nist.getCpeFromCve(cve)
        if len(vendor_cpes)>0:
            cpes=cpes+[["nist.gov",vendor_cpes]]
    except:
        pass
    return(cpes)
コード例 #2
0
def getCpeFromCve(cve):
    cpes = []
    try:
        vendor_cpes = microsoft.getCpeFromCve(cve)
        if len(vendor_cpes) > 0:
            cpes = cpes + [["microsoft.com", vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes = oracle.getCpeFromCve(cve)
        if len(vendor_cpes) > 0:
            cpes = cpes + [["oracle.com", vendor_cpes]]
    except:
        pass
    try:
        # OVAL more accurate, too slow
        #vendor_cpes=redhat.getCpeFromCveOval(cve)
        vendor_cpes = redhat.getCpeFromCve(cve)
        if len(vendor_cpes) > 0:
            cpes = cpes + [["redhat.com", vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes = adobe.getCpeFromCve(cve)
        if len(vendor_cpes) > 0:
            cpes = cpes + [["adobe.com", vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes = vmware.getCpeFromCve(cve)
        if len(vendor_cpes) > 0:
            cpes = cpes + [["vmware.com", vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes = vmware.getCpeFromCve(cve)
        if len(vendor_cpes) > 0:
            cpes = cpes + [["wireshark.org", vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes = cisco.getCpeFromCve(cve)
        if len(vendor_cpes) > 0:
            cpes = cpes + [["cisco.com", vendor_cpes]]
    except:
        pass
    try:
        vendor_cpes = nist.getCpeFromCve(cve)
        if len(vendor_cpes) > 0:
            cpes = cpes + [["nist.gov", vendor_cpes]]
    except:
        pass
    return (cpes)
コード例 #3
0
ファイル: IAVM.py プロジェクト: empereor/cyberxml-django
def getCpeFromIavm(iavm):
    cves=getCveFromIavm(iavm)
    cpes=[]
    for cve in cves:
        cpes=cpes+redhat.getCpeFromCve(cve)
        cpes=cpes+microsoft.getCpeFromCve(cve)
        cpes=cpes+oracle.getCpeFromCve(cve)
        cpes=cpes+adobe.getCpeFromCve(cve)
        cpes=cpes+vmware.getCpeFromCve(cve)
        cpes=cpes+cisco.getCpeFromCve(cve)
        cpes=cpes+wireshark.getCpeFromCve(cve)
        cpes=cpes+nist.getCpeFromCve(cve)
    return(cpes)
コード例 #4
0
ファイル: IAVM.py プロジェクト: pombredanne/cyberxml-django
def getCpeFromIavm(iavm):
    cves=getCveFromIavm(iavm)
    cpes=[]
    for cve in cves:
        # more accurate to use Oval, too slow
        #cpes=cpes+redhat.getCpeFromCveOval(cve)
        cpes=cpes+redhat.getCpeFromCve(cve)
        cpes=cpes+microsoft.getCpeFromCve(cve)
        cpes=cpes+oracle.getCpeFromCve(cve)
        cpes=cpes+adobe.getCpeFromCve(cve)
        cpes=cpes+vmware.getCpeFromCve(cve)
        cpes=cpes+cisco.getCpeFromCve(cve)
        cpes=cpes+wireshark.getCpeFromCve(cve)
        cpes=cpes+nist.getCpeFromCve(cve)
    return(cpes)
コード例 #5
0
def getCpeFromIavm(iavm):
    cves = getCveFromIavm(iavm)
    cpes = []
    for cve in cves:
        # more accurate to use Oval, too slow
        #cpes=cpes+redhat.getCpeFromCveOval(cve)
        cpes = cpes + redhat.getCpeFromCve(cve)
        cpes = cpes + microsoft.getCpeFromCve(cve)
        cpes = cpes + oracle.getCpeFromCve(cve)
        cpes = cpes + adobe.getCpeFromCve(cve)
        cpes = cpes + vmware.getCpeFromCve(cve)
        cpes = cpes + cisco.getCpeFromCve(cve)
        cpes = cpes + wireshark.getCpeFromCve(cve)
        cpes = cpes + nist.getCpeFromCve(cve)
    return (cpes)