nvd-client


Namenvd-client JSON
Version 0.1.3.1 PyPI version JSON
download
home_pagehttps://github.com/ahur4/nvd-client
SummaryA Python client for interacting with the National Vulnerability Database (NVD) API to fetch CVE data.
upload_time2024-09-22 13:10:55
maintainerNone
docs_urlNone
authorAhur4
requires_python>=3.6
licenseNone
keywords vulnerability nvd national vulnerability database nvd_client nvd_client-api ahur4 ahura rahmani redteam soc vulnerability assessment penetration testing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# NVD API Client

![PyPI](https://img.shields.io/pypi/v/nvd-client)
![Daily Downloads](https://img.shields.io/pypi/dd/nvd-client)
![Monthly Downloads](https://img.shields.io/pypi/dm/nvd-client)
[![Telegram-Channel](https://img.shields.io/badge/Telegram--Channel-Ahura_Rahmani-blue)](https://t.me/Ahur4_Rahmani)


A Python client for interacting with the National Vulnerability Database (NVD) API to fetch CVE data.

## Features

- Fetch all CVEs with pagination
- Fetch CVE by its ID
- Fetch CVEs by publication or modification date
- Fetch CVEs by CPE name
- Other features coming soon...

## Installation

You can install the package using pip:

```sh
pip install nvd_client
```

## Usage

```python
from nvd_client import NvdApi
from datetime import datetime, timedelta

# Initialize the API client
api_key = "your_api_key_here"
nvd_api = NvdApi(api_key)

# Fetch all CVEs
cves = nvd_api.get_all_cves(per_page=100, offset=0)
print(cves)

# Fetch a CVE by ID
cve = nvd_api.get_cve_by_id(cve_id="CVE-2024-30078")
print(cve)

# Fetch CVEs by publish or modify date range
cves_by_date = nvd_api.get_cve_by_date(
    per_page=100,
    offset=0,
    publish_start_date=datetime.now() - timedelta(days=2),
    publish_end_date=datetime.now()
)
print(cves_by_date)

# Fetch CVEs by CPE name
cves_by_cpe = nvd_api.get_cve_by_cpe(
    cpe_name="cpe:2.3:o:microsoft:windows_10:1607:*:*:*:*:*:*:*",
    per_page=100,
    offset=0
)
print(cves_by_cpe)
```

## Author

- Author: Ahur4

- Telegram: [@Ahura_rahmani](https://t.me/Ahura_rahmani)

## License

This project is licensed under the MIT License. See the `LICENSE` file for details.


### Explanation:
1. **Features**: Lists the main functionalities provided by the module.
2. **Installation**: Provides instructions for installing the package using pip from PyPI.
3. **Usage**: Gives examples of how to initialize the client and use its methods.
4. **Author**: Provides your name and a link to your Telegram channel.
5. **License**: States that the project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ahur4/nvd-client",
    "name": "nvd-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "vulnerability, nvd, national vulnerability database, nvd_client, nvd_client-api, ahur4, ahura rahmani, redteam, soc, vulnerability assessment, penetration testing",
    "author": "Ahur4",
    "author_email": "ahur4.rahmani@gmail.com",
    "download_url": null,
    "platform": null,
    "description": "\r\n# NVD API Client\r\n\r\n![PyPI](https://img.shields.io/pypi/v/nvd-client)\r\n![Daily Downloads](https://img.shields.io/pypi/dd/nvd-client)\r\n![Monthly Downloads](https://img.shields.io/pypi/dm/nvd-client)\r\n[![Telegram-Channel](https://img.shields.io/badge/Telegram--Channel-Ahura_Rahmani-blue)](https://t.me/Ahur4_Rahmani)\r\n\r\n\r\nA Python client for interacting with the National Vulnerability Database (NVD) API to fetch CVE data.\r\n\r\n## Features\r\n\r\n- Fetch all CVEs with pagination\r\n- Fetch CVE by its ID\r\n- Fetch CVEs by publication or modification date\r\n- Fetch CVEs by CPE name\r\n- Other features coming soon...\r\n\r\n## Installation\r\n\r\nYou can install the package using pip:\r\n\r\n```sh\r\npip install nvd_client\r\n```\r\n\r\n## Usage\r\n\r\n```python\r\nfrom nvd_client import NvdApi\r\nfrom datetime import datetime, timedelta\r\n\r\n# Initialize the API client\r\napi_key = \"your_api_key_here\"\r\nnvd_api = NvdApi(api_key)\r\n\r\n# Fetch all CVEs\r\ncves = nvd_api.get_all_cves(per_page=100, offset=0)\r\nprint(cves)\r\n\r\n# Fetch a CVE by ID\r\ncve = nvd_api.get_cve_by_id(cve_id=\"CVE-2024-30078\")\r\nprint(cve)\r\n\r\n# Fetch CVEs by publish or modify date range\r\ncves_by_date = nvd_api.get_cve_by_date(\r\n    per_page=100,\r\n    offset=0,\r\n    publish_start_date=datetime.now() - timedelta(days=2),\r\n    publish_end_date=datetime.now()\r\n)\r\nprint(cves_by_date)\r\n\r\n# Fetch CVEs by CPE name\r\ncves_by_cpe = nvd_api.get_cve_by_cpe(\r\n    cpe_name=\"cpe:2.3:o:microsoft:windows_10:1607:*:*:*:*:*:*:*\",\r\n    per_page=100,\r\n    offset=0\r\n)\r\nprint(cves_by_cpe)\r\n```\r\n\r\n## Author\r\n\r\n- Author: Ahur4\r\n\r\n- Telegram: [@Ahura_rahmani](https://t.me/Ahura_rahmani)\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the `LICENSE` file for details.\r\n\r\n\r\n### Explanation:\r\n1. **Features**: Lists the main functionalities provided by the module.\r\n2. **Installation**: Provides instructions for installing the package using pip from PyPI.\r\n3. **Usage**: Gives examples of how to initialize the client and use its methods.\r\n4. **Author**: Provides your name and a link to your Telegram channel.\r\n5. **License**: States that the project is licensed under the MIT License.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python client for interacting with the National Vulnerability Database (NVD) API to fetch CVE data.",
    "version": "0.1.3.1",
    "project_urls": {
        "Homepage": "https://github.com/ahur4/nvd-client"
    },
    "split_keywords": [
        "vulnerability",
        " nvd",
        " national vulnerability database",
        " nvd_client",
        " nvd_client-api",
        " ahur4",
        " ahura rahmani",
        " redteam",
        " soc",
        " vulnerability assessment",
        " penetration testing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22f02fe7b8b6fa0a039c226f11a09e3354d95651fc86df6f6c312bb7d89c4b47",
                "md5": "24e6de07ea59ffa0a5bacf7e1e00d6cf",
                "sha256": "50537a1bb4ea0e9544e6681cf5c5a8353ae0ba2a1cc906924adf36f19c486d59"
            },
            "downloads": -1,
            "filename": "nvd_client-0.1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "24e6de07ea59ffa0a5bacf7e1e00d6cf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6838,
            "upload_time": "2024-09-22T13:10:55",
            "upload_time_iso_8601": "2024-09-22T13:10:55.853575Z",
            "url": "https://files.pythonhosted.org/packages/22/f0/2fe7b8b6fa0a039c226f11a09e3354d95651fc86df6f6c312bb7d89c4b47/nvd_client-0.1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-22 13:10:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ahur4",
    "github_project": "nvd-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "nvd-client"
}
        
Elapsed time: 4.57730s