Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/eonraider/blackhat-python3
OSINT (Open Source Intelligence)Code AnalysisExploitationForensicsPost-ExploitationWeb SecurityNetwork SecurityMalware AnalysisCryptographyPenetration TestingLearning & Education
GitHubeonraider/blackhat-python3

blackhat-python3

Source code for the book "Black Hat Python" by Justin Seitz. The code has been fully converted to Python 3, reformatted to comply with PEP8 standards and refactored to eliminate dependency issues involving the implementation of deprecated libraries.

View Repository
2.4k455827 days agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    772
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    505
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    420
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    345
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    260
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    251

Explore all tools

Browse our collection of tools

View all tools →
Share

Black Hat Python 3

CI Python 3.11-3.14 Managed with uv Open in GitHub Codespaces

The source code from the first edition of Black Hat Python: Python Programming for Hackers and Pentesters by Justin Seitz (No Starch Press, 2014), converted from Python 2 to Python 3 and refactored to run on current interpreters and libraries.

The scripts stay close to the printed listings so they can be read side by side with the book. Every change made during the conversion is documented in docs/CONVERSION_NOTES.md.

[!NOTE] No Starch Press published a second edition in 2021, by Justin Seitz and Tim Arnold, written for Python 3 from the start. This repository follows the first edition. If you have the second edition, use the publisher's code instead.

A companion conversion of Violent Python by TJ O'Connor lives at EONRaider/violent-python3.

Contents

  • Quick start
  • Chapters
  • Downloading only what you need
  • Authorized use
  • Contributing
  • Translations
  • License and credits

Quick start

Python 3.11 or newer. Pick one of the following setups.

uv (recommended)

uv installs the right Python version if you don't have it and reproduces the exact dependency versions tested in CI from uv.lock.

git clone https://github.com/EONRaider/blackhat-python3.git
cd blackhat-python3
uv sync                              # every chapter
uv run python chapter02/bhnet.py -h

Each chapter is a separate dependency group, so you can install only what you are reading:

uv sync --only-group ch04            # just chapter 4

On Windows, the ch08-ch10 groups also install pywin32 and wmi; on other platforms they are skipped automatically.

pip

git clone https://github.com/EONRaider/blackhat-python3.git
cd blackhat-python3
python3 -m venv .venv
source .venv/bin/activate            # Windows: .venv\Scripts\activate
pip install -r requirements.txt      # every chapter
pip install -r requirements/ch04.txt # or just one chapter

requirements*.txt carry version ranges. For the exact versions tested in CI, use requirements-lock.txt from the latest release. With pip 25.1 or newer, you can also install a chapter's group straight from pyproject.toml with pip install --group ch04.

Docker

Each release publishes an image for linux/amd64 and linux/arm64 with every cross-platform chapter's dependencies and common network tools preinstalled:

docker run --rm -it ghcr.io/eonraider/blackhat-python3
# Chapters that sniff or forge packets need raw-socket capabilities:
docker run --rm -it --cap-add=NET_RAW --cap-add=NET_ADMIN ghcr.io/eonraider/blackhat-python3
# Or build it yourself:
docker build -t blackhat-python3 . && docker run --rm -it blackhat-python3

The image runs as root because most raw-socket chapters need it. The container is the sandbox, so only add the capabilities a chapter needs. The Windows chapters (8-10) can't run in it.

GitHub Codespaces / Dev Containers

Use the Open in GitHub Codespaces badge above, or open the folder in VS Code or JetBrains with the Dev Containers extension. The container (.devcontainer/devcontainer.json) has the same tools as the Docker image, plus uv, git and compilers, and comes with raw-socket capabilities already granted.

Chapters

ChapterTopicuv groupPyPI packagesNotes
02The network: basicsch02paramikotest_rsa.key is Paramiko's public test key (from its test suite), needed by bh_sshserver.py.
03Raw sockets and sniffing--Standard library only. Needs root / Administrator.
04Owning the network with Scapych04kamene, opencv-pythonUses kamene, a Python 3 fork of Scapy from the time of the conversion. Needs root / NET_RAW.
05Web hackery--Standard library only. Wordlists all.txt and cain.txt are included.
06Extending Burp Proxy--Burp Suite extensions that run under Jython 2.7 (jython-standalone-2.7.2.jar is included), not CPython.
07GitHub command and controlch07github3.pyNeeds a GitHub repository and a personal access token.
08Common trojaning tasks on Windowsch08pywin32 (Windows)Windows only. keylogger.py does not run on any supported Python yet: it imports pyHook, which nothing installable provides (see the conversion notes).
09Fun with Internet Explorerch09pycryptodome, pywin32 (Windows)Windows only, except the crypto helpers.
10Windows privilege escalationch10pywin32 (Windows), wmi (Windows)Windows only. bhvulnservice.zip is the book's vulnerable service.
11Automating offensive forensics--Needs Immunity Debugger (immlib, Python 2.7) and the Volatility 2 framework. Neither installs from PyPI.

Chapter 1 of the book covers setting up the environment and has no code. The PyPI column is generated by python tools/deps_scan.py report, which reads the imports in each chapter. The OS and privilege notes come from the conversion notes and may be incomplete; corrections are welcome.

Downloading only what you need

A full checkout is about 46 MB plus 51 MB of history. Most of the tree is the 43 MB Jython JAR in chapter06/, so shallow clones (--depth 1) don't save much. To download just the chapters you want:

git clone --filter=blob:none --sparse https://github.com/EONRaider/blackhat-python3.git
cd blackhat-python3
git sparse-checkout set chapter02 chapter03    # any chapters you want

Or skip cloning entirely and use the Docker image.

Authorized use

This code includes trojans, keyloggers, credential harvesters and privilege-escalation tooling. Run it only against systems you own or have written permission to test. Some files, such as chapter10/bhvulnservice.zip, chapter11/cmeasure.bin and the chapter 8 keylogger, may be flagged by antivirus software. That is expected; see SECURITY.md.

Contributing

Download Tool