This project is a simple web application that fetches and displays recent Common Vulnerabilities and Exposures (CVEs) based on a keyword search. The application uses the NVD API to retrieve CVEs and presents them in a user-friendly format using Bootstrap.
app.py: The main server script that handles HTTP requests, interacts with the NVD API, and serves the HTML content.index.html: The HTML file that serves as the front-end for the application.config.py: A configuration file that contains the API key for accessing the NVD API: https://nvd.nist.gov/developers/request-an-api-keyREADME.md: Shows information about the project.
- Python 3.x
requestslibrary for Python
-
Clone the repository:
git clone <repository_url> cd ThreatFetch
-
Install the required Python packages:
pip3 install requests
-
Create the
config.pyfile: In the root directory (cveScript), create aconfig.pyfile and add your NVD API key:# config.py NVD_API_KEY = 'your_api_key_here'
-
Run the server:
python3 app.py
-
Open your web browser and navigate to
http://127.0.0.1:8000/.
- Enter a keyword (e.g., "Cisco", "Microsoft", or "CVE-2024-1234") in the search bar.
- Click the "Fetch CVEs" button.
- View the results: The CVEs related to the keyword will be displayed on the page in a formatted card layout, results are within last month.
If you encounter this error, ensure that:
- The
config.pyfile exists in the root directory. - The
NVD_API_KEYvariable is correctly defined inconfig.py.
If the application fails to fetch CVEs due to API key issues:
- Verify that the API key in
config.pyis correct. - Ensure that your API key has not expired or been invalidated.
