cvequery


Namecvequery JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/n3th4ck3rx/cvequery
SummaryQuery CVE details using Shodan's public CVE database API.
upload_time2025-01-23 10:34:19
maintainerNone
docs_urlNone
authorNeo
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements requests click colorama
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🔍 cvequery - CVE Search and Analysis Tool

[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![Version](https://img.shields.io/badge/version-1.0.2-orange.svg)](https://test.pypi.org/project/cvequery/)

A powerful command-line tool to search and analyze CVE (Common Vulnerabilities and Exposures) data using Shodan's public CVE database API.

## ✨ Features

- 🔍 Search CVEs by product name or CPE
- 📊 Filter results by severity, date range, and KEV status
- 📈 Sort results by EPSS score
- 📥 Export results to JSON format
- 🖌️ Colorized output for better readability
- ⏳ Auto-update functionality

## 📦 Installation

### If you want to install the tool easily, I recommend using `pipx`:

```bash
pipx install cvequery
```

### 2. Manual Installation (From Source)

If you prefer to manually install the tool from the source, you can clone the repository and set up the environment locally.

#### Steps to Install Manually:

1. Clone the Repository:

   First, clone the `cvequery` repository from GitHub to your local machine:
   ```bash
   git clone https://github.com/n3th4ck3rx/cvequery.git
   cd cvequery
   ```

2. Set Up a Virtual Environment (Optional but recommended):

   It's best practice to use a virtual environment to avoid conflicts with other Python packages.

   ```bash
   # Create a virtual environment (you can name it anything)
   python3 -m venv venv

   # Activate the virtual environment:
   # On Windows:
   venv\Scripts\activate
   # On macOS/Linux:
   source venv/bin/activate
   ```

3. Install Dependencies:

   Now, install the required dependencies from the `requirements.txt` file:

   ```bash
   pip install -r requirements.txt
   ```

4. Run the Tool:

   After installing the dependencies, you can run the tool using the following command:

   ```bash
   python cvequery.py 
   ```

5. (Optional) Install as a Global Tool:

   If you want to install the tool globally on your system for easier use, you can use:

   ```bash
   pip install .
   ```

   This will install the tool locally within your environment or globally depending on your Python setup.

## 🛠️ Command Options

### ⚙️ Basic Options
- `-c, --cve TEXT` - Get details for a specific CVE ID
- `-mc, --multiple-cves TEXT` - Query multiple CVEs (comma-separated or file path)
- `-pcve, --product-cve TEXT` - Search CVEs by product name
- `-pcpe, --product-cpe TEXT` - Search by product name for CPE lookup
- `--version` - Show the current version
- `-up, --update` - Update to the latest version

### 🔍 Search Filters
- `-k, --is-kev` - Show only Known Exploited Vulnerabilities
- `-s, --severity TEXT` - Filter by severity (critical,high,medium,low)
- `-sd, --start-date TEXT` - Start date for CVE search (YYYY-MM-DD)
- `-ed, --end-date TEXT` - End date for CVE search (YYYY-MM-DD)
- `--cpe23 TEXT` - Search CVEs by CPE 2.3 string
- `-epss, --sort-by-epss` - Sort results by EPSS score

### 📋 Output Options
- `-f, --fields TEXT` - Comma-separated list of fields to display
- `-j, --json TEXT` - Save output to JSON file
- `-oci, --only-cve-ids` - Output only CVE IDs
- `--count` - Show only the total count of results
- `-fl, --fields-list` - List all available fields

### 📊 Pagination Options
- `--skip-cves INTEGER` - Number of CVEs to skip
- `--limit-cves INTEGER` - Maximum number of CVEs to return
- `--skip-cpe INTEGER` - Number of CPEs to skip
- `--limit-cpe INTEGER` - Maximum number of CPEs to return

## 📚 Examples

### Basic CVE Lookup
```bash
# Look up a specific CVE
cvequery -c CVE-2019-5127

# Search for multiple CVEs
cvequery -mc CVE-2019-5129,CVE-2019-5127

# Load CVEs from a file
cvequery -mc cve_list.txt
```

### Product Search
```bash
# Search CVEs for a product
cvequery -pcve apache

# Search with severity filter
cvequery -pcve apache -s critical,high

# Search with date range
cvequery -pcve apache -sd 2023-01-01 -ed 2023-12-31
```

### Advanced Filtering
```bash
# Search for Known Exploited Vulnerabilities
cvequery -pcve windows -k

# Sort by EPSS score
cvequery -pcve apache -epss

# Show only specific fields
cvequery -pcve nginx -f cve_id,summary,cvss_v3
```

### CPE Lookup
```bash
# Search CPEs for a product
cvequery -pcpe apache

# Use CPE 2.3 format
cvequery --cpe23 cpe:2.3:a:libpng:libpng:0.8
```

### Output Options
```bash
# Save results to JSON
cvequery -pcve apache -j output.json

# Show only CVE IDs
cvequery -pcve apache -oci

# Show total count of CPES
cvequery -pcve apache --count
```

## 🗂️ Version Management

### Check Current Version
```bash
cvequery --version
```

### Update to Latest Version
```bash
cvequery -up
```

## 📋 Available Fields

To see all available fields:
```bash
cvequery -fl
```

Available fields include:
- id
- summary
- cvss
- cvss_v2
- cvss_v3
- epss
- epss_score
- kev
- references
- published
- modified
- cpes
- cwe

### **Upcoming Features**
- **Autocomplete**: Command and flag autocompletion for faster workflows.
- **Progress Tracking**: Real-time progress for batch CVE processing.
- **Integration with Security Tools**: Compatibility with tools like Nmap and Nessus.
- **Multiple Output Formats**: Output to Other formats like csv,html etc.

## **Contributing**

 Take a look at the [Contributing](CONTRIBUTING.md) Page.

## ⚖️ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 📬 Contact

[![X](https://img.shields.io/badge/X-%23000000.svg?style=for-the-badge&logo=X&logoColor=white)](https://x.com/n3th4ck3rx) 

[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white)](https://discord.com/users/n3th4ck3rx) 

---
Made with ❤️ by Neo


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/n3th4ck3rx/cvequery",
    "name": "cvequery",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Neo",
    "author_email": "Neo <neo.nzso@proton.me>",
    "download_url": "https://files.pythonhosted.org/packages/13/80/e102aaf84f043fdf333c120840276e8228ee6b272b2b9cc04b60eee2d34d/cvequery-1.0.2.tar.gz",
    "platform": null,
    "description": "# \ud83d\udd0d cvequery - CVE Search and Analysis Tool\n\n[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/version-1.0.2-orange.svg)](https://test.pypi.org/project/cvequery/)\n\nA powerful command-line tool to search and analyze CVE (Common Vulnerabilities and Exposures) data using Shodan's public CVE database API.\n\n## \u2728 Features\n\n- \ud83d\udd0d Search CVEs by product name or CPE\n- \ud83d\udcca Filter results by severity, date range, and KEV status\n- \ud83d\udcc8 Sort results by EPSS score\n- \ud83d\udce5 Export results to JSON format\n- \ud83d\udd8c\ufe0f Colorized output for better readability\n- \u23f3 Auto-update functionality\n\n## \ud83d\udce6 Installation\n\n### If you want to install the tool easily, I recommend using `pipx`:\n\n```bash\npipx install cvequery\n```\n\n### 2. Manual Installation (From Source)\n\nIf you prefer to manually install the tool from the source, you can clone the repository and set up the environment locally.\n\n#### Steps to Install Manually:\n\n1. Clone the Repository:\n\n   First, clone the `cvequery` repository from GitHub to your local machine:\n   ```bash\n   git clone https://github.com/n3th4ck3rx/cvequery.git\n   cd cvequery\n   ```\n\n2. Set Up a Virtual Environment (Optional but recommended):\n\n   It's best practice to use a virtual environment to avoid conflicts with other Python packages.\n\n   ```bash\n   # Create a virtual environment (you can name it anything)\n   python3 -m venv venv\n\n   # Activate the virtual environment:\n   # On Windows:\n   venv\\Scripts\\activate\n   # On macOS/Linux:\n   source venv/bin/activate\n   ```\n\n3. Install Dependencies:\n\n   Now, install the required dependencies from the `requirements.txt` file:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. Run the Tool:\n\n   After installing the dependencies, you can run the tool using the following command:\n\n   ```bash\n   python cvequery.py \n   ```\n\n5. (Optional) Install as a Global Tool:\n\n   If you want to install the tool globally on your system for easier use, you can use:\n\n   ```bash\n   pip install .\n   ```\n\n   This will install the tool locally within your environment or globally depending on your Python setup.\n\n## \ud83d\udee0\ufe0f Command Options\n\n### \u2699\ufe0f Basic Options\n- `-c, --cve TEXT` - Get details for a specific CVE ID\n- `-mc, --multiple-cves TEXT` - Query multiple CVEs (comma-separated or file path)\n- `-pcve, --product-cve TEXT` - Search CVEs by product name\n- `-pcpe, --product-cpe TEXT` - Search by product name for CPE lookup\n- `--version` - Show the current version\n- `-up, --update` - Update to the latest version\n\n### \ud83d\udd0d Search Filters\n- `-k, --is-kev` - Show only Known Exploited Vulnerabilities\n- `-s, --severity TEXT` - Filter by severity (critical,high,medium,low)\n- `-sd, --start-date TEXT` - Start date for CVE search (YYYY-MM-DD)\n- `-ed, --end-date TEXT` - End date for CVE search (YYYY-MM-DD)\n- `--cpe23 TEXT` - Search CVEs by CPE 2.3 string\n- `-epss, --sort-by-epss` - Sort results by EPSS score\n\n### \ud83d\udccb Output Options\n- `-f, --fields TEXT` - Comma-separated list of fields to display\n- `-j, --json TEXT` - Save output to JSON file\n- `-oci, --only-cve-ids` - Output only CVE IDs\n- `--count` - Show only the total count of results\n- `-fl, --fields-list` - List all available fields\n\n### \ud83d\udcca Pagination Options\n- `--skip-cves INTEGER` - Number of CVEs to skip\n- `--limit-cves INTEGER` - Maximum number of CVEs to return\n- `--skip-cpe INTEGER` - Number of CPEs to skip\n- `--limit-cpe INTEGER` - Maximum number of CPEs to return\n\n## \ud83d\udcda Examples\n\n### Basic CVE Lookup\n```bash\n# Look up a specific CVE\ncvequery -c CVE-2019-5127\n\n# Search for multiple CVEs\ncvequery -mc CVE-2019-5129,CVE-2019-5127\n\n# Load CVEs from a file\ncvequery -mc cve_list.txt\n```\n\n### Product Search\n```bash\n# Search CVEs for a product\ncvequery -pcve apache\n\n# Search with severity filter\ncvequery -pcve apache -s critical,high\n\n# Search with date range\ncvequery -pcve apache -sd 2023-01-01 -ed 2023-12-31\n```\n\n### Advanced Filtering\n```bash\n# Search for Known Exploited Vulnerabilities\ncvequery -pcve windows -k\n\n# Sort by EPSS score\ncvequery -pcve apache -epss\n\n# Show only specific fields\ncvequery -pcve nginx -f cve_id,summary,cvss_v3\n```\n\n### CPE Lookup\n```bash\n# Search CPEs for a product\ncvequery -pcpe apache\n\n# Use CPE 2.3 format\ncvequery --cpe23 cpe:2.3:a:libpng:libpng:0.8\n```\n\n### Output Options\n```bash\n# Save results to JSON\ncvequery -pcve apache -j output.json\n\n# Show only CVE IDs\ncvequery -pcve apache -oci\n\n# Show total count of CPES\ncvequery -pcve apache --count\n```\n\n## \ud83d\uddc2\ufe0f Version Management\n\n### Check Current Version\n```bash\ncvequery --version\n```\n\n### Update to Latest Version\n```bash\ncvequery -up\n```\n\n## \ud83d\udccb Available Fields\n\nTo see all available fields:\n```bash\ncvequery -fl\n```\n\nAvailable fields include:\n- id\n- summary\n- cvss\n- cvss_v2\n- cvss_v3\n- epss\n- epss_score\n- kev\n- references\n- published\n- modified\n- cpes\n- cwe\n\n### **Upcoming Features**\n- **Autocomplete**: Command and flag autocompletion for faster workflows.\n- **Progress Tracking**: Real-time progress for batch CVE processing.\n- **Integration with Security Tools**: Compatibility with tools like Nmap and Nessus.\n- **Multiple Output Formats**: Output to Other formats like csv,html etc.\n\n## **Contributing**\n\n Take a look at the [Contributing](CONTRIBUTING.md) Page.\n\n## \u2696\ufe0f License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udcec Contact\n\n[![X](https://img.shields.io/badge/X-%23000000.svg?style=for-the-badge&logo=X&logoColor=white)](https://x.com/n3th4ck3rx) \n\n[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white)](https://discord.com/users/n3th4ck3rx) \n\n---\nMade with \u2764\ufe0f by Neo\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Query CVE details using Shodan's public CVE database API.",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/n3th4ck3rx/cvequery"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e1efda739cc79349a70cee7a42fc7fe6e27a944d5a5a05b608f2ec022e15044e",
                "md5": "0c3a8e62d72bf879bb6f3e3e8b75dfe4",
                "sha256": "3d341553a71a6ce2372c682db99985a641b6efa1f183dbb8e35dbe397662cdaf"
            },
            "downloads": -1,
            "filename": "cvequery-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0c3a8e62d72bf879bb6f3e3e8b75dfe4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 12024,
            "upload_time": "2025-01-23T10:34:15",
            "upload_time_iso_8601": "2025-01-23T10:34:15.511939Z",
            "url": "https://files.pythonhosted.org/packages/e1/ef/da739cc79349a70cee7a42fc7fe6e27a944d5a5a05b608f2ec022e15044e/cvequery-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1380e102aaf84f043fdf333c120840276e8228ee6b272b2b9cc04b60eee2d34d",
                "md5": "2a582948b9edaa937440c316ebc953ce",
                "sha256": "a2a29a5edfeb149bfcb7e622c5ec2ee2fce84b8e16a7ea2d5229891c79ec4e16"
            },
            "downloads": -1,
            "filename": "cvequery-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "2a582948b9edaa937440c316ebc953ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14695,
            "upload_time": "2025-01-23T10:34:19",
            "upload_time_iso_8601": "2025-01-23T10:34:19.064831Z",
            "url": "https://files.pythonhosted.org/packages/13/80/e102aaf84f043fdf333c120840276e8228ee6b272b2b9cc04b60eee2d34d/cvequery-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-23 10:34:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "n3th4ck3rx",
    "github_project": "cvequery",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.25.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    ">=",
                    "8.0.0"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    ">=",
                    "0.4.4"
                ]
            ]
        }
    ],
    "lcname": "cvequery"
}
        
Neo
Elapsed time: 0.37416s