Black Hat Python - Python Programming for Hackers and Pentesters - 2nd Edition

I had read the first edition of this book in 2015-ish. That version was very intriguing, but it exclusively used Python version 2 for all examples. This was a time when the language was known to be in transition to version 3, although many were doing so somewhat cautiously, if at all.

The 2nd edition of this book covers the same material with updates that include usage of Python 3 and the appropriate counterpart libraries. In some cases, some newer, better approaches are taken.

Among the things that they demonstrate immediately is how to build your own netcat in Python if a sysadmin takes that utility away. They also explore various kinds of proxies, tunnels, web-scrapers, and they even provide short scripts that provide SSH servers for remote connections. There are a few chapters of the book that are Windows-specific, which can be kind of handy, but with the ubiquity of Powershell, I doubt if I’d use Python to approach certain Windows tasks.

That said, I think this book is not just for security researchers. There’s some very interesting tech that they employ in each section. While it’s not an in-depth tutorial in penetration testing ( nor does it pretend to be ) it does whet one’s appetites with possibilities of what can be done with modern Python.

Recommended.