Skip to main content

An optimized Python3 library to fetch the most recent exploit-database,

Project description

NOTICE

This is the new home of "pyexploitdb".

pyexploitdb (https://shanewilliamscott.com)

Python package Known Vulnerabilities

Authors:

Shane William Scott

About pyexploitdb

pyexploitdb builds and maintains local CVE↔EDB indexes from the official exploit-db repository with a focus on resilience and observability.

Highlights

  • Validates on-disk caches and normalises mappings to keep indexes trustworthy.
  • Rebuilds quickly by parsing files_exploits.csv first and only scraping missing CVEs with bounded concurrency.
  • Ships with a practical smoke-test suite (python -m tests.smoke_test) so releases can be verified before publishing.

Upcoming features

CPE database, indexes and mappings

Installation

pip install pyexploitdb

Note: This assumes pip is for your python3 environment. Use pip3 if pip is for your python2 environment.

Example Usage

from pyexploitdb import PyExploitDb
exploit_db = PyExploitDb()
exploit_db.debug = False
exploit_db.open_file()
results = exploit_db.search_cve("CVE-2018-14592")
for exploit in results:
    print(f"{exploit['id']} -> {exploit['file']}")

search_cve returns a list of dictionaries (one per matching exploit). The library raises pyexploitdb.PyExploitDbError when required data is missing or network/git operations fail after retrying.

To rebuild the CVE caches from scratch without hammering exploit-db, metadata is extracted from files_exploits.csv first and any missing CVEs fall back to concurrent (throttled) scraping:

from pyexploitdb import PyExploitDb

with PyExploitDb() as exploit_db:
    exploit_db.update_db(workers=6)  # adjust workers to control parallel HTTP fetches

Tests

Run the practical smoke tests before publishing to PyPI:

python -m tests.smoke_test

Example debug/verbose output

CVE-2018-1459 Found Exploit DB Id: 45447 File: ./exploit-database/exploits/php/webapps/45447.txt Date: 2018-09-24 Author: Haboob Team Platform: webapps Type: php Port: 80 {'edbid': '45447', 'exploit': './exploit-database/exploits/php/webapps/45447.txt', 'date': '2018-09-24', 'author': 'Haboob Team', 'platform': 'webapps', 'type': 'php', 'port': '80'}

Credits

Based on fork from https://github.com/GoVanguard/pyExploitDb by Shane Scott. Originally based on fork of cve_searchsploit by Andrea Fioraldi.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyexploitdb-0.3.19.tar.gz (397.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyexploitdb-0.3.19-py3-none-any.whl (418.8 kB view details)

Uploaded Python 3

File details

Details for the file pyexploitdb-0.3.19.tar.gz.

File metadata

  • Download URL: pyexploitdb-0.3.19.tar.gz
  • Upload date:
  • Size: 397.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pyexploitdb-0.3.19.tar.gz
Algorithm Hash digest
SHA256 ea52da7048cbb2aedddfd221e5a41b5e7a224ac1e6e0ee0b57c7b6d959ccc3dd
MD5 59c731c0476fa91c2773b3299ad5a012
BLAKE2b-256 05b2999b02d4ff5ff9f39e75c9016a318d9171b32be50a29d4035fbb726b5a4b

See more details on using hashes here.

File details

Details for the file pyexploitdb-0.3.19-py3-none-any.whl.

File metadata

  • Download URL: pyexploitdb-0.3.19-py3-none-any.whl
  • Upload date:
  • Size: 418.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for pyexploitdb-0.3.19-py3-none-any.whl
Algorithm Hash digest
SHA256 6904388f8896b4e54d8d7b296ea29e4b4869a6beac63d7f6dd2a430d9b21d307
MD5 bfcdff4458124151e338540c5915da80
BLAKE2b-256 d14703482ac0feff2e964a8b8996cc7973026f7109bded0b15bfb44f67b74f25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page