Exemple #1
0
def main():

    if len(sys.argv) == 3:
        myCVE = sys.argv[2]
        apiMethod = sys.argv[1]
        
        if apiMethod == "export":
            vfeed = vFeedXML(myCVE)
            vfeed.export()
            exit(0)
    
        vfeed = vFeed(myCVE)
        try:
            globals()['call_%s' % apiMethod](vfeed)
        except:
            print'[error] the method %s is not implemented' % apiMethod
        else:
            exit(0)
   
    elif len(sys.argv) == 2:
        apiMethod = sys.argv[1]
        if apiMethod == "update":
            db = vFeedUpdate()
            db.update()
            exit(0)
        else:
           get_help()
    else:
        get_help() 
Exemple #2
0
def main():

    if len(sys.argv) == 3:
        myinput = sys.argv[2]
        apiMethod = sys.argv[1]
        
        if apiMethod == "search":
            search = vFeedSearch(myinput)
            search.search()
            exit(0)

        if apiMethod == "export":
            vfeed = vFeedXML(myinput)
            vfeed.export()
            exit(0)
    
        vfeed = vFeed(myinput)
        try:
            globals()['call_%s' % apiMethod](vfeed)
        except:
            print'[error] the method %s is not implemented' % apiMethod
        else:
            exit(0)
   
    elif len(sys.argv) == 2:
        apiMethod = sys.argv[1]
        
        if apiMethod == "update":
            db = vFeedUpdate()
            db.update()
            exit(0)
        
        if apiMethod == "get_stats":
            stat = vFeedStats()
            stat.get_stats()
            exit(0)           
            
        if apiMethod == "get_latest":
            stat = vFeedStats()
            stat.get_latest()
            exit(0)    
        
        else:
           get_help()
    else:
        get_help() 
Exemple #3
0
def main():

    info = vFeedInfo()

    if len(sys.argv) == 3:
        myCVE = sys.argv[2]
        apiMethod = sys.argv[1]

    else:
        print ''
        print '-----------------------------------------------------------------------------'
        print info.get_version()['title']
        print '                                                          version ' + info.get_version()['build']
        print '                                         ' + info.get_owner()['website']
        print '-----------------------------------------------------------------------------'
        print ''
        print '[usage]: ' + str(sys.argv[0]) + ' <API Method> <CVE id>'
        print ''
        print '[info] Available vFeed methods:'
        print 'Information  ==> get_cve | get_cpe | get_cwe | get_capec | get_category | get_iavm'
        print 'References   ==> get_refs | get_scip | get_osvdb | get_certvn'
        print 'Risk         ==> get_risk | get_cvss'
        print 'Patchs       ==> get_ms | get_kb | get_aixapar | get_redhat | get_suse | get_debian'
        print 'Patchs       ==> get_mandriva | get_cisco | get_ubuntu | get_gentoo | get_fedora | get_vmware'
        print 'Assessment   ==> get_oval | get_nessus | get_openvas '
        print 'Defense      ==> get_snort | get_suricata'
        print 'Exploitation ==> get_milw0rm | get_edb | get_saint | get_msf'
        print ''
        print 'Hint: Type ./vfeedcmd.py export CVE-XXXX-XXXX to export the CVE as vFeed XML format'
        print ''
        exit(0)

    vfeed = vFeed(myCVE)

    if apiMethod == "export":
        
        vfeed = vFeedXML(myCVE)
        vfeed.export()
        exit(0)

    try:
        globals()['call_%s' % apiMethod](vfeed)
    except:
        print'[error] the method %s is not implemented' % apiMethod
    else:
        exit(0)
Exemple #4
0
def main():

    info = vFeedInfo()

    if len(sys.argv) == 3:
        myCVE = sys.argv[2]
        apiMethod = sys.argv[1]

    else:
        print ''
        print '-----------------------------------------------------------------------------'
        print info.get_version()['title']
        print '                                                          version ' + info.get_version()['build']
        print '                                         ' + info.get_owner()['website']
        print '-----------------------------------------------------------------------------'
        print ''
        print '[usage]: ' + str(sys.argv[0]) + ' <API Method> <CVE id>'
        print ''
        print '[info] Available vFeed methods:'
        print 'Information  ==> get_cve | get_cpe | get_cwe | get_capec | get_category | get_iavm'
        print 'References   ==> get_refs | get_scip | get_osvdb | get_certvn'
        print 'Risk         ==> get_risk | get_cvss'
        print 'Patchs       ==> get_ms | get_kb | get_aixapar | get_redhat | get_suse | get_debian'
        print 'Patchs       ==> get_mandriva | get_cisco | get_ubuntu | get_gentoo | get_fedora'
        print 'Assessment   ==> get_oval | get_nessus | get_openvas '
        print 'Defense      ==> get_snort'
        print 'Exploitation ==> get_milw0rm | get_edb | get_saint | get_msf'
        print ''
        print 'Hint: Type ./vfeedcmd.py export CVE-XXXX-XXXX to export the CVE as vFeed XML format'
        print ''
        exit(0)

    vfeed = vFeed(myCVE)

    if apiMethod == "export":
        
        vfeed = vFeedXML(myCVE)
        vfeed.export()
        exit(0)

    try:
        globals()['call_%s' % apiMethod](vfeed)
    except:
        print'[error] the method %s is not implemented' % apiMethod
    else:
        exit(0)
Exemple #5
0
def main():

    if len(sys.argv) == 3:
        myinput = sys.argv[2]
        apiMethod = sys.argv[1]

        if apiMethod == "search":
            search = vFeedSearch(myinput)
            search.search()
            exit(0)

        if apiMethod == "export":
            vfeed = vFeedXML(myinput)
            vfeed.export()
            exit(0)

        vfeed = vFeed(myinput)
        try:
            globals()['call_%s' % apiMethod](vfeed)
        except:
            print '[error] the method %s is not implemented' % apiMethod
        else:
            exit(0)

    elif len(sys.argv) == 2:
        apiMethod = sys.argv[1]

        if apiMethod == "update":
            db = vFeedUpdate()
            db.update()
            exit(0)

        if apiMethod == "get_stats":
            stat = vFeedStats()
            stat.get_stats()
            exit(0)

        if apiMethod == "get_latest":
            stat = vFeedStats()
            stat.get_latest()
            exit(0)

        else:
            get_help()
    else:
        get_help()
for i in range(0, len(cvesaintexp)):
    print 'saint Exploit id:', cvesaintexp[i]['id']
    print 'saint Exploit Title:', cvesaintexp[i]['title']
    print 'saint Exploit File:', cvesaintexp[i]['file']
print 'total found saint Exploit', len(cvesaintexp)

print '[invoking] the get_msf() method '
cvemsfexp = vfeed.get_msf()
for i in range(0, len(cvemsfexp)):
    print 'msf Exploit id:', cvemsfexp[i]['id']
    print '\tmsf Exploit Title:', cvemsfexp[i]['title']
    print '\tmsf Exploit File:', cvemsfexp[i]['file']
print 'total found msf Exploit', len(cvemsfexp)



print '[Generating XML] Invoking the exportXML() method '

cve = "cve-2014-0160"
print '[Exporting] Creating new instance with cve ', cve
vfeed = vFeedXML(cve)
vfeed.export()

print '[Updating db] Invoking the update method from within your scripts'
db = vFeedUpdate()
db.update()

print '[searching a CPE] Invoking the search method from within your scripts'
mycpe = "cpe:/a:adobe:acrobat:9.5.1"
search = vFeedSearch(mycpe)
search.search()
Exemple #7
0
print '[invoking] the get_saint() method '
cvesaintexp = vfeed.get_saint()
for i in range(0, len(cvesaintexp)):
    print 'saint Exploit id:', cvesaintexp[i]['id']
    print 'saint Exploit Title:', cvesaintexp[i]['title']
    print 'saint Exploit File:', cvesaintexp[i]['file']
print 'total found saint Exploit', len(cvesaintexp)

print '[invoking] the get_msf() method '
cvemsfexp = vfeed.get_msf()
for i in range(0, len(cvemsfexp)):
    print 'msf Exploit id:', cvemsfexp[i]['id']
    print '\tmsf Exploit Title:', cvemsfexp[i]['title']
    print '\tmsf Exploit File:', cvemsfexp[i]['file']
print 'total found msf Exploit', len(cvemsfexp)

print '[Generating XML] Invoking the exportXML() method '

cve = "cve-2014-0160"
print '[Exporting] Creating new instance with cve ', cve
vfeed = vFeedXML(cve)
vfeed.export()

print '[Updating db] Invoking the update method from within your scripts'
db = vFeedUpdate()
db.update()

print '[searching a CPE] Invoking the search method from within your scripts'
mycpe = "cpe:/a:adobe:acrobat:9.5.1"
search = vFeedSearch(mycpe)
search.search()