Skip to content

Repository files navigation

🐍 Black Hat Python 3 — Updated & Working Code

All source code from Black Hat Python, 2nd Edition (Justin Seitz & Tim Arnold)
rewritten, tested, and modernized for Python 3.x in 2024–2025.

Most repos for this book have broken code. This one runs.


📌 Why This Repo Exists

The official book examples were written years ago and break on modern Python 3.
Every script here has been:

  • ✅ Rewritten for Python 3.10+
  • ✅ Tested with updated libraries
  • ✅ Fixed for deprecated APIs and syntax changes
  • ✅ Structured for easy chapter-by-chapter reference

📂 Chapter Index

# Chapter Topics Covered
01 Intro Environment setup, Python basics for hacking
02 Networking TCP/UDP clients, servers, netcat replacement
03 SSH Shelling Paramiko, SSH tunneling, remote command execution
04 Sniffing Raw sockets, packet capture, IP/ICMP decoding
05 Scapy Packet crafting, ARP poisoning, pcap analysis
06 Web Hackery Burp wordlist generator, web fuzzing, login brute force
07 Extending Burp Proxy Burp Suite extensions in Python
08 GitHub C2 GitHub-based command and control trojan
09 Trojan Tasks Keylogger, screenshot capture, shell tasks
10 Fun with Exfiltration Data exfiltration over email, file encryption
11 Windows Privilege Escalation WMI, process monitoring, token privileges
12 Offensive Forensics Volatility3, memory forensics, process injection

⚙️ Requirements

Python 3.10+
pip install -r requirements.txt

Recommended environment: Kali Linux or any Debian-based distro.
Windows is supported for chapters 09, 10, 11.


🚀 Quick Start

git clone https://github.com/arsh-hash/Black-Hat-Python3.git
cd Black-Hat-Python3
pip install -r requirements.txt

Navigate to any chapter folder and run the script directly.


📖 Book Reference

Black Hat Python, 2nd Edition
Authors: Justin Seitz & Tim Arnold
Publisher: No Starch Press
ISBN: 978-1718501126


⚠️ Disclaimer

This repository is for educational purposes only.
All code should be used only in authorized environments.
The author is not responsible for any misuse.


🤝 Contributing

Found a bug or have an improvement? Open a PR — contributions welcome.


⭐ Star this repo if it helped you

It helps others find it and supports the project.