def get_help(): info = vFeedInfo() print '' print '-----------------------------------------------------------------------------' print info.get_version()['title'] print ' version ' + info.get_version()['build'] print ' ' + info.get_owner()['website'] print '-----------------------------------------------------------------------------' print '' print '[usage 1]: python' + str(sys.argv[0]) + ' <Method> <CVE>' 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 | get_bid' print 'Risk ==> get_risk | get_cvss' print 'Patchs 1/2 ==> get_ms | get_kb | get_aixapar | get_redhat | get_suse | get_debian | get_hp' print 'Patchs 2/2 ==> 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 '[usage 2]: python ' + str(sys.argv[0]) + ' export <CVE>' print '[info]: This method will export the CVE as vFeed XML format' print '' print '----------' print '[Update]: python ' + str(sys.argv[0]) + ' update' print '[info]: This method will update the SQLite vfeed database to its latest release' print '' exit(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)
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)
def get_help(): info = vFeedInfo() print '' print '-----------------------------------------------------------------------------' print info.get_version()['title'] print ' version ' + info.get_version( )['build'] print ' ' + info.get_owner( )['website'] print '-----------------------------------------------------------------------------' print '' print '[usage 1]: python ' + str(sys.argv[0]) + ' <Method> <CVE>' print '[info] Available vFeed methods:' print 'Information ==> get_cve | get_cpe | get_cwe | get_capec | get_category' print 'References ==> get_refs | get_scip | get_osvdb | get_certvn | get_bid | get_iavm' print 'Risk ==> get_risk | get_cvss' print 'Patchs 1/2 ==> get_ms | get_kb | get_aixapar | get_redhat | get_suse | get_debian | get_hp' print 'Patchs 2/2 ==> get_mandriva | get_cisco | get_ubuntu | get_gentoo | get_fedora | get_vmware' print 'Assessment ==> get_oval | get_nmap | get_nessus | get_openvas ' print 'Defense ==> get_snort | get_suricata' print 'Exploitation ==> get_milw0rm | get_edb | get_saint | get_msf | get_d2' print '' print '----------' print '[usage 2]: python ' + str(sys.argv[0]) + ' export <CVE>' print '[info]: This method will export the CVE as vFeed XML format' print '' print '----------' print '[usage 3]: python ' + str(sys.argv[0]) + ' search <CVE> | <CPE>' print '[info]: This method searches for CVE or CPE. It returns useful information that will help you dig deeper.' print '' print '----------' print '[usage 4]: python ' + str(sys.argv[0]) + ' stats or latest_cve' print '[info]: Available stats methods' print 'Global statistics ==> get_stats' print 'Latest Added CVEs ==> get_latest ' print '' print '----------' print '[Update]: python ' + str(sys.argv[0]) + ' update' print '[info]: This method will update the SQLite vfeed database to its latest release' exit(0)
def get_help(): info = vFeedInfo() print '' print '-----------------------------------------------------------------------------' print info.get_version()['title'] print ' version ' + info.get_version()['build'] print ' ' + info.get_owner()['website'] print '-----------------------------------------------------------------------------' print '' print '[usage 1]: python ' + str(sys.argv[0]) + ' <Method> <CVE>' print '[info] Available vFeed methods:' print 'Information ==> get_cve | get_cpe | get_cwe | get_capec | get_category' print 'References ==> get_refs | get_scip | get_osvdb | get_certvn | get_bid | get_iavm' print 'Risk ==> get_risk | get_cvss' print 'Patchs 1/2 ==> get_ms | get_kb | get_aixapar | get_redhat | get_suse | get_debian | get_hp' print 'Patchs 2/2 ==> get_mandriva | get_cisco | get_ubuntu | get_gentoo | get_fedora | get_vmware' print 'Assessment ==> get_oval | get_nmap | get_nessus | get_openvas ' print 'Defense ==> get_snort | get_suricata' print 'Exploitation ==> get_milw0rm | get_edb | get_saint | get_msf | get_d2' print '' print '----------' print '[usage 2]: python ' + str(sys.argv[0]) + ' export <CVE>' print '[info]: This method will export the CVE as vFeed XML format' print '' print '----------' print '[usage 3]: python ' + str(sys.argv[0]) + ' search <CVE> | <CPE>' print '[info]: This method searches for CVE or CPE. It returns useful information that will help you dig deeper.' print '' print '----------' print '[usage 4]: python ' + str(sys.argv[0]) + ' stats or latest_cve' print '[info]: Available stats methods' print 'Global statistics ==> get_stats' print 'Latest Added CVEs ==> get_latest ' print '' print '----------' print '[Update]: python ' + str(sys.argv[0]) + ' update' print '[info]: This method will update the SQLite vfeed database to its latest release' exit(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 '-----------------------------------------------------------' print '' print '[usage]: ' + str(sys.argv[0]) + ' <API Method> <CVE id>' print '' print '[info] available API methods:' print 'checkCVE | checkCPE | checkCVSS | checkCWE | checkREF | checkRISK' print 'checkOVAL | checkNESSUS | checkEDB | checkSAINT' print 'checkMS | checkKB | checkAIXAPAR | checkREDHAT | checkSUSE | checkDEBIAN | checkMANDRIVA' print 'exportXML (for exporting the vFeed XML file)' exit(0) vfeed = vFeed(myCVE) if apiMethod == "exportXML": vfeed.exportXML() exit(0) try: globals()['call_%s' % apiMethod](vfeed) except: print '[error] the method %s is not implemented' % apiMethod else: exit(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 '-----------------------------------------------------------' print '' print '[usage]: ' + str(sys.argv[0]) + ' <API Method> <CVE id>' print '' print '[info] available API methods:' print 'checkCVE | checkCPE | checkCVSS | checkCWE | checkREF | checkRISK' print 'checkOVAL | checkNESSUS | checkEDB | checkSAINT' print 'checkMS | checkKB | checkAIXAPAR | checkREDHAT | checkSUSE | checkDEBIAN | checkMANDRIVA' print 'exportXML (for exporting the vFeed XML file)' exit(0) vfeed = vFeed(myCVE) if apiMethod == "exportXML": vfeed.exportXML() exit(0) try: globals()['call_%s' % apiMethod](vfeed) except: print'[error] the method %s is not implemented' % apiMethod else: exit(0)
#!/usr/bin/env python from vfeed import vFeed, vFeedInfo, vFeedXML,vFeedUpdate, vFeedSearch ''' vfeed_calls_sample.py - Sample script to call methods from your programs Wiki documentation https://github.com/toolswatch/vFeed/wiki ''' # create an instance of the class vFeedInfo print '[instance] creating an instance with vFeedApi.vFeedInfo() ' info = vFeedInfo() print '[invoking] the get_version() method ' print 'version: ', info.get_version()['build'] print '[invoking] the get_owner() method ' print 'author (if you want to get in touch and say hello):', info.get_owner()['author'] print '[invoking] the get_config() method (note that the values are returned in dict. You can then read any key value you need ..' print 'vFeed global config returned as dict:', info.get_config()['primary'] # Invoking the vFeed class cve = "cve-2014-0160" print '[setting] using cve ', cve
#!/usr/bin/env python from vfeed import vFeed, vFeedInfo, vFeedXML, vFeedUpdate, vFeedSearch ''' vfeed_calls_sample.py - Sample script to call methods from your programs Wiki documentation https://github.com/toolswatch/vFeed/wiki ''' # create an instance of the class vFeedInfo print '[instance] creating an instance with vFeedApi.vFeedInfo() ' info = vFeedInfo() print '[invoking] the get_version() method ' print 'version: ', info.get_version()['build'] print '[invoking] the get_owner() method ' print 'author (if you want to get in touch and say hello):', info.get_owner( )['author'] print '[invoking] the get_config() method (note that the values are returned in dict. You can then read any key value you need ..' print 'vFeed global config returned as dict:', info.get_config()['primary'] # Invoking the vFeed class cve = "cve-2014-0160" print '[setting] using cve ', cve # create an instance of the class vFeed and pass the cve print '[instance] creating an instance with vFeedApi.vFeed(cve) ' vfeed = vFeed(cve)