Sploitus

Exploit for CVE-Poc_All_in_One

githubexploit Β· 2026-08-05

Exploit Code

README140 lines
## https://sploitus.com/exploit?id=4DDFA596-54E9-5C9C-86B3-278A5EAFBC7C
# CVE Poc All in One πŸ›‘οΈ

This is a tool for searching, filtering, and cloning repositories related to CVE vulnerabilities from GitHub. The tool searches for repositories on GitHub based on specified query conditions, filters them according to CVE numbers, and clones those that meet the criteria. ## ✨ Features

- πŸ” Supports search and filtering using the GitHub API
- πŸ“‹ Automatically identifies and extracts CVE numbers
- πŸ“… Filters CVE vulnerabilities by year
- ⭐ Retains repositories with the highest number of Stars (for duplicate CVEs)
- 🧹 Automatically cleans up cloned repositories (deletes `.git` directories, LICENSE, and other unnecessary files)
- πŸ“Š Controls the size and number of files to avoid downloading overly large repositories
- βš™οΈ Supports configuration via command-line parameters, environment variables, or an `.env` file

## πŸš€ How to Use

### πŸ’» Command-Line Parameters

```
python main.py --github-token YOUR_TOKEN --year 2025 --page 10 --query "CVE-2025-"
```

Parameter descriptions:

- `--github-token`: πŸ”‘ GitHub access token (required)
- `--year`: πŸ“… Year of the CVE to search for, e.g., 2025, 2024, etc. (default: 2025)
- `--page`: πŸ“‘ Page number of search results, or enter "all" to get all pages (default: 10)
- `--query`: πŸ”Ž Search query (default: CVE-2025-)

### πŸ”€ Explanation of Query Strings

**What is a query string?**

A query string is a keyword used to search for relevant repositories on GitHub. It is sent to the GitHub search API to find repositories containing specific content. **What do you need to input?**

You need to input keywords that can help find relevant CVE vulnerability code. Here are some examples of common query strings:

1. **Basic query**: `cve POC` – Searches for repositories containing CVE and POC (proof of concept)
2. **Specific vulnerability type**: `cve SQL injection` – Searches for CVE vulnerabilities related to SQL injection
3. **Specific software**: `cve wordpress` – Searches for CVE vulnerabilities related to WordPress
4. **Specific language**: `cve python` – Searches for CVE vulnerabilities related to Python
5. **Combined query**: `cve exploit python` – Searches for vulnerability exploitation code written in Python

Query strings affect the scope and accuracy of search results. Generally, more specific queries will return more relevant results. ### βš–οΈ Parameter Priorities

The tool supports multiple configuration methods, with priorities from high to low as follows:
1. **Command-line parameters** – Parameters specified directly via the command line
2. **Environment variables** – System environment variables
3. **.env file** – Configurations in the `.env` file at the project root directory
4. **Default values** – Default values defined in the code

### 🌐 Using Environment Variables

You can set parameters using environment variables:

```bash
# Windows (PowerShell)
$env:GITHUB_TOKEN="your_token"
$env:CVE_YEAR="2025"
$env:PAGE="10"
$env:SEARCH_QUERY="CVE-2025-"
python main.py

# Linux/Mac
export GITHUB_TOKEN=your_token
export CVE_YEAR=2025
export PAGE=10
export SEARCH_QUERY="CVE-2025-"
python main.py
```

### πŸ“„ Using the .env File

We provide a `.env.example` example file. You can copy it and modify it to become a `.env` file:

1. Copy the example file:
   ```bash
   # Windows
   copy .env.example .env
   
   # Linux/Mac
   cp .env.example .env
   ```

2. Edit the `.env` file and fill in your configurations:
   ```
   # GitHub access token (required)
   GITHUB_TOKEN=your_github_token_here
   
   # Year of the CVE to search for
   CVE_YEAR=2025
   
   # Page number of search results
   PAGE=10
   
   # Search query
   SEARCH_QUERY=CVE-2025-
   ```

3. Run the program directly:
   ```
   python main.py
   ```

> **Note**: The `.env` file contains sensitive information. Do not submit it to version control systems. Make sure `.gitignore` includes `.env`. ## πŸ”„ Workflow

1. The tool searches for repositories from the GitHub API based on the query string and year.
2. Filters out repositories containing specific CVE numbers (e.g., CVE-2024-1234).
3. For each CVE number, retains the repository with the highest number of Stars.
4. Clones these repositories into directories named by year and CVE number.
5. Cleans the cloned repositories by deleting unnecessary files and directories.
6. Checks the size of the repositories; delete those that are too large.

## πŸ“ Output Directory Structure

```
2024/
  β”œβ”€β”€ CVE-2024-1234/
  β”‚   β”œβ”€β”€ ... Files after cleaning
  β”œβ”€β”€ CVE-2024-5678/
  β”‚   β”œβ”€β”€ ... Files after cleaning
```

## πŸ“¦ Dependency Installation

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

## πŸ”„ GitHub Actions Integration

This tool is configured for GitHub Actions, allowing it to run automatically every day and update repositories. You can see the configuration details in `.github/workflows/python-cve-check.yml`. ## ⚠️ Notes

1. πŸ”‘ Ensure that your GitHub Token has sufficient permissions.
2. ⏱️ The GitHub API has rate limits. If a limit is reached, try again later.
3. πŸ’Ύ The tool automatically filters out overly large repositories to save disk space.
4. πŸ“ All operations are recorded in the `cvemapping.log` file.

## πŸ“œ License

MIT