msd0pe-1 / cve-maker

Tool to find CVEs and Exploits.
GNU General Public License v3.0
459 stars 77 forks source link

not displayed critical CVEs #7

Open Ondrik8 opened 1 month ago

Ondrik8 commented 1 month ago

good afternoon here is the problem on kali linux double-checked on two hosts

host: 1 (first run after installation) image

host: 2 (Previously the script worked and displayed critical CVEs, but after I upgraded the system this happened:) image

MidavSec commented 1 month ago

found a work around:

def do_critical(self, arg):
    'Get latest critical CVEs. Usage: critical'
    print()
    critical_log = log.progress("Looking for the latest critical CVEs")
    try:
        critical_url = requests.get("https://www.opencve.io/cve?cvss=critical&search=", headers=header)

        # New regex based on the HTML structure you provided
        criticals = re.findall(
            r'<a href="/cve/(CVE-\d{4}-\d+)">.*?</a>.*?<a href=.*?>(.*?)</a>.*?<a href=.*?>(.*?)</a>.*?(\d{4}-\d{2}-\d{2}).*?<span class="label label-critical">(\d+\.?\d*)\s*Critical</span>.*?<tr class="cve-summary">\s*<td.*?>(.*?)</td>',
            critical_url.text,
            re.DOTALL
        )

        critical_log.success(colorama.Fore.GREEN + "✓" + colorama.Style.RESET_ALL)

        # PrettyTable to format output
        x = PrettyTable()
        x.field_names = ["CVE", "CVSS", "Vendor", "Product", "Description", "Updated"]

        for critical in criticals:
            cve_id = critical[0]
            vendor = critical[1]
            product = critical[2]
            updated = critical[3]
            cvss = critical[4]
            description = critical[5][:100]  # Limit description length

            # Add row to the table
            x.add_row([cve_id, colorama.Fore.RED + cvss + colorama.Style.RESET_ALL, vendor[:20], product[:20], description, updated])

        print()
        print(x)
        print()
    except Exception as e:
        critical_log.failure(e)