Skip to content
 
 

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CVE Quick Lookup Tool

A Python CLI tool to fetch Common Vulnerabilities and Exposures (CVE) details from NVD API + NVD detail pages. This tool retrieves:

  • CVE
  • Title
  • Description
  • Published date
  • NVD URL
  • CVSS_3.X_Max (maximum CVSS 3.x score found)
  • CVSS_4_Max (maximum CVSS 4.0 score found)
  • Supports:
    • Single CVE input
    • File input (one CVE per line)
    • Stdin input (-)
  • CSV output via --outfile
  • Terminal output with colorized score severity
  • Optional retries and API key support

CVSS 2.x is intentionally excluded to keep this tool focused on current scoring standards (CVSS 3.X and 4.0).

Requirements

This tool has been built and tested with Python 3.10+. To install the requirements, run:

python -m pip install -r 'requirements.txt'

Usage

usage: cvelookup.py [-h] [-o OUTFILE] [--quiet] [--no-color] [--sleep SLEEP]
                    [--nvd-api-key NVD_API_KEY] [--retries RETRIES]
                    input

Fetch NVD details for CVEs and print/optionally write CSV (CVSS 3.X & 4.0
only).

positional arguments:
  input                 Either a CVE ID, a file of CVEs, or '-' for stdin.

optional arguments:
  -h, --help            show this help message and exit
  -o OUTFILE, --outfile OUTFILE
                        Optional CSV file to write results.
  --quiet               Suppress screen output.
  --no-color            Disable colored output.
  --sleep SLEEP         Seconds to sleep between requests.
  --nvd-api-key NVD_API_KEY
                        Optional NVD API key (or set env NVD_API_KEY).
  --retries RETRIES     Number of API retries (default 1).

Quick examples:

# Single CVE to terminal output
python 'cvelookup.py' CVE-2024-3094

# Read CVEs from file and export CSV only
python 'cvelookup.py' 'cves.txt' --outfile 'results.csv' --quiet

# Pipe input from stdin (PowerShell)
Get-Content '.\cves.txt' | python 'cvelookup.py' -

# Use API key + retries + request delay
python 'cvelookup.py' 'cves.txt' --nvd-api-key YOURKEY --retries 3 --sleep 0.2

API Key

You can request an NVD API key here:

Use it either by:

  • --nvd-api-key YOURKEY
  • NVD_API_KEY environment variable

About

CVE Information searcer on Python

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages