
Black Hat Python
Python Programming for Hackers and Pentesters
by Justin Seitz, Tim Arnold · first published 2014
12mentions
7recommended by
11HN commenters
2015–2024first – last mentioned
64% recommend36% neutral
Why HN recommends it
Short, practical Python code examples for security tasks, useful for learning offensive techniques and as a cookbook-style reference; suits people new to security tooling who want working scripts to build on.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.

…which, while not groundbreaking, was supremely interesting and readable. If you like Aziz's standup, it's basically him playing sociologist for 200 pages. Right now I'm going back and forth between Black Hat Python (because I owe it to myself to at least learn a little bit of this stuff) and What We Talk About When We Talk About Love by Carver. Two totally separate ends of the spectrum, but they're both great.
on “Ask HN: What books are you reading?” ↗…Gives interesting insights in the healthy values at Google. How Not to Be Wrong: The Power of Mathematical Thinking - Interesting discussions about correct/incorrect interpretations of data/statistics. Black Hat Python - Gives short code examples of what can be possible to do. Programming Collective Intelligence - Outdated but very inspiring hands on examples of ML in Python
on “Ask HN: What are the best books that changed your life in 2015?” ↗…(CERT-RMM) - The Code Book | Simon Singh - The Tao of Network Security Monitoring: Beyond Intrusion Detection | Richard Bejtlich - The Cuckoos Egg | Cliff Stoll - Linux Pro Magazine - Black Hat Python | Justin Seitz - Hacking: The Art Of Exploitation | Jon Erickson
on “Ubuntu Security Podcast: Best Infosec Books” ↗@aoruz: My story matches up with your's quite closely. One suggestion I would have for a future book to read is either Black Hat Python, Grey Hat Python, or Violent Python all "hacker" related books that are great for anyone interested in security at any level. BlackHat Python is number one pic.
on “I taught myself Python on the Internet and so can you” ↗Thanks for the link! I will definitely have to listen to this later. Black Hat Python and Grey Hat Python are great cookbooks and references for learning offensive Python skills, and I've used both books quite a bit to help others learn Python for security.
on “Using Python for offensive cyber security and penetration testing [audio]” ↗I'll just add to what others have already provided. - "Black Hat Go" - https://nostarch.com/blackhatgo - "Black Hat Python" - https://nostarch.com/blackhatpython - "Web Security for Developers" - https://nostarch.com /websecurity - "Cracking Codes with Python" - https://nostarch.com/crackingcodes Highly recommend…
on “Kali Linux 2020.3” ↗Black Hat Python, along with RTFM: Red Team Field Manual; are excellent resources for binpacking your brain with some simple effective uses of tools to serve a need. I don't feel the same about this book. Python is…
on “Black Hat Rust” ↗I'm casual reading these books * Iron-Clad Java: Building Secure Web Applications. * How Linux Works: What Every Superuser Should Know. * Black Hat Python. Paused reading * Functional Programming in Scala. * Version Control with Git. Bought due to HN praises, skimmed through, but probably won't read * Structure and Interpretation of Computer Programs.
on “Ask HN: Which book are you reading these days?” ↗I completely understand the need to ban books like Black Hat Python but they also ban First Html5 Programming and Microsoft Excel 2016 For Dummies? We do actually want to rehabilitate these folks and teach them valuable life skills right? How is banning books on HTML…
on “Oregon prisons ban many technology and programming books” ↗…book. Game Engine Black Book: Wolfenstein 3D http://fabiensanglard.net/gebbwolf3d/ Other examples would be things like building Machine Learning Powered Applications, Modern Full-Stack Development,Black Hat Python etc. This was asked last year, and I came into some very interesting reads. I figured it would be worth asking again!
on “Ask HN: Fun Tech Book Recommendations?” ↗There is a book called "Black Hat Python". The second edition targets Python 3 and because of the nature of the topic is mostly lower level programming.
on “Ask HN: Books that teach you programming languages via systems projects?” ↗There's a book like these for a bunch of modern languages; I think "Black Hat Python" started the trend, like 10-15 years ago.
on “Black Hat Rust” ↗