def check_exploit(cve): msf = CveExploit(cve).get_msf() edb = CveExploit(cve).get_edb() if len(json.loads(msf)) != 0: print "\t\t\t[!] Metasploit exploit found." if len(json.loads(edb)) != 0: print "\t\t\t[!] Exploit-DB PoC found."
def check_exploit(cve): msf = CveExploit(cve).get_msf() edb = CveExploit(cve).get_edb() if msf is not "null": print "\t\t\t[!] Metasploit exploit found." if edb is not "null": print "\t\t\t[!] Exploit-DB PoC found."
def search_cve(cve, references, cpe, scanners, exploits): # # Informational # basic = CveInfo(cve).get_cve() info("Basic information of", cve) pretty_print(json.loads(basic)) # cvss = CveRisk(cve).get_cvss() # info("CVSS information related to", cve) # pretty_print(json.loads(cvss)) severity = CveRisk(cve).get_severity() info("Risk information related to", cve) pretty_print(json.loads(severity)) cwe = CveInfo(cve).get_cwe() info("CWE information related to", cve) pretty_print(json.loads(cwe)) #capec = CveInfo(cve).get_capec() #info("CAPEC information related to", cve) #pretty_print(json.loads((capec))) #category = CveInfo(cve).get_category() #info("CATEGORY information related to", cve) #pretty_print(json.loads(category)) if references: refs = CveRef(cve).get_refs() info("Reference information related to", cve) pretty_print(json.loads(refs)) if cpe: cpe = CveInfo(cve).get_cpe() info("Total of CPEs found is:", len(json.loads(cpe))) info("CPE information related to", cve) pretty_print(json.loads(cpe)) if scanners: #oval = CveScanners(cve).get_oval() #info("OVAL information related to", cve) #pretty_print(json.loads((oval)) nmap = CveScanners(cve).get_nmap() info("Nmap information related to", cve) pretty_print(json.loads(nmap)) nessus = CveScanners(cve).get_nessus() info("Nessus information related to", cve) info("Total Nessus:", len(json.loads(nessus))) pretty_print(json.loads(nessus)) if exploits: metasploit = CveExploit(cve).get_msf() info("Metasploit information related to", cve) pretty_print(json.loads(metasploit)) edb = CveExploit(cve).get_edb() info("Exploit-DB information related to", cve) pretty_print(json.loads(edb))
def check_exploit(cve): msf = CveExploit(cve).get_msf() edb = CveExploit(cve).get_edb() if json.loads(msf) is not None: if len(json.loads(msf)) != 0: print(' -> Metasploit exploit found.') #print(' -> id: %s' % json.loads(msf)[0]['id']) pretty_print(json.loads(msf), 3) if json.loads(edb) is not None: if len(json.loads(edb)) != 0: print(' -> Exploit-DB PoC found.') #print(' -> url: %s' % json.loads(edb)[0]['url']) pretty_print(json.loads(edb), 3)
def check_edb(cve): edb = CveExploit(cve).get_edb() if edb is not "null": edb = json.loads(edb) return edb else: return None
def check_msf(cve): msf = CveExploit(cve).get_msf() if msf is not "null": msf = json.loads(msf) return msf else: return None