Example #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() 
Example #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() 
Example #3
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()
Example #4
0
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()
Example #5
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()