Sharing my github repo for: Black Hat Python (Seitz Book) source code re-edited, updated to Python3 and tested
For those of you trying to learn Python... (Black Hat Python)
Do you recommend ‘Black hat python’ for beginners?
are Grey Hat Python and Violent Python still relevant for learning to hack with Python?
https://github.com/carloocchiena/blackhat_python_book_code
I quite enjoyed the book, but as 2021 it looks quite outdated, not just for the choice of using Python 2.7.
Deliberately, as expressed by the author, the scripts are written raw & dirty to simulate the approach he uses during a penetration testing.
Since I had to convert all the source codes anyway, to run them on my machine (Kali Linux VM + Win10 OS + Win10 VM + Python 3.9) I decided to go extra-mile and save them in a repo, in the meantime trying to optimize the code and making it a little more elegant
Improvement made from the book's code
Refactoring to Python 3 and code testing (unless otherwise specified)
Update to PEP8 standards
Upgraded readability (es. comments, indentation, variable names, file names)
Update of obsolete methods (es. print -s %)
Better context management (es. open with, server.close())
Disregard of unsupported libs
Minor tweaks and bugs found while testing the code
Search for additional files requested throughout the book and not provided, or provided at outdated links, and included in individual chapters
Additional information and resources that I searched for and found useful as I made my way through the book
If someone's going thru the same journey may find this resource somehow helpful