Gray Hat Python: Python Programming for Hackers and Reverse Engineers 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Frequently bought together
Customers who viewed this item also viewed
About the Author
There was a problem filtering reviews right now. Please try again later.
The code is a disaster. It is unclearly written, with a mixture of typos and lines shouldn't be there. If you type in the code as written, it does not work. There were some "updates" added to correct some issues, but other unclear/incorrect parts are not in the updates. If the code doesn't work as-written, it is impossible to tell if I'm entering the code wrong or if the problem is the way the code is written in the book.
For a breakdown of the errors: http://stacksmash.org/2009/06/gray-hat-python-by-justin-seitz-errata/
In short, it's a great 31 pages but after that the book is useless. If one is already an expert in Python and C, then they can possibly know enough to correct the coding errors but the reason I bought the book was to gain experience with Python. Is it that hard to at least make sure the code works?
I wouldn't have an issue with typographical errors, but the code falling part as early as page 31 is inexcusable.
Very, very disappointed with not only this book but No Starch Press.
Do not buy.
As others have pointed out, this book is dated. Code is in python2. pydbg is not updated in more than 10 years. Immunity debugger is still being maintained but getting a copy requires personal information which I do not want to provide. IDA pro is also hard to get. The concepts are still relevant though. You will definitely learn some concepts about security. At least for me I now know what hackers use debuggers for.
The content itself is good. It's well organized and very clear, even for someone like me who is a self-taught programmer with ~1 year of Python experience. Perusing Chapters 2 and 3 should bring anyone up to speed on debuggers. The remaining chapters do a nice job of explaining various Python tools to use in hacking and reverse engineering.
Unfortunately, the code fragments in Chapter 3 (where you build your own debugger in Python) could best be described as a disaster. I expect a programming book's code to run without extensive tweaks. I don't need it to be the most Pythonic code in the world ... just generate the expected results. Given the importance of Chapter 3 to your understanding of a good portion of the book, these errors were a killer.
Given that the code required extensive fixes to run as intended, the errata (now on No Starch Press's website) was delayed by at least a year from publishing, and there was no forum on No Starch Press's website to pass errata around in the meantime, the book loses 2 stars.
The lesson: if you're going to publish a programming book, get the code right. Absent the ability to do so, at least support your book's readers in working around the issues.
Edit: Sorry, wanted to point out one more thing. For Chapter 3, the code on the website's source files don't always match the code walked through in the book, even on parts of the code that are fully functioning. Your best bet is to start with the code on the website and debug that.
That being said, I found this book to be a very interesting read. It took my mind to uses of Python that I had truly never considered before!
It is in my opinion not for someone learning Python. Also, if you already have an understanding of some of the internals of computing, you'll get more out of the book. Worst case, though, it will show you areas where you might want to partake of further study.
You are not going to learn anything "subversive" in this book. But, with what you learn in this book, and your imagination, you could certainly come up with something of that ilk.
If you're into hacking ( in the broad definition of the term: to really learn everything you can about the machine, etc. ), you'll enjoy this book. If you're just looking for recipes, or "script kiddie" stuff, you'll be disappointed.
I recommend the book.
Top international reviews
Then I turned to chapter 3.
I flicked through the rest of the book. It's entirely based around Windows reverse engineering. I'm not a windows guy - I'm a Linux guy. I was expecting so much more from this book.
Complete description fail. Even on the cover (same with it's Amazon description) this book only made one mention to Windows. I didn't expect the whole book to be based around Windows. What a waste of money for me.
I'm incredibly disappointed. If I hadn't waited a few months to start reading the book I'd have returned it.
I gave it 2 stars just because Chapter 2 was incredibly useful + enjoyable.
The author knows what he's writing about, so all in all worth its money. Something for every reverse engineer's bookshelf.