You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nemo a56ebe0498 More cleanup 3 weeks ago
.dockerignore Adds Dockerfile and LICENSE 1 year ago
.gitignore initial commit 💥 1 year ago
Dockerfile Move to pystitcher 3 weeks ago
LICENSE Adds Dockerfile and LICENSE 1 year ago More cleanup 3 weeks ago Move to pystitcher 3 weeks ago
cover-thumb.jpg Use local thumbnail for cover 1 year ago
cover.jpg Adds a README 1 year ago
cover.pdf New chapter, and official cover PDF 12 months ago More cleanup 3 weeks ago
meta.txt Update for 7th September 9 months ago
urls.txt Update for 7th September 9 months ago


Update: The website currently only has 7 sample chapters since the remaining were removed at the book's publication. The script should automatically start working in May 2024, when these chapters should become available.


This is just the script to generate a combined PDF from the currently-online-chapters that were published for review. The script also takes care of putting in the right bookmarks for all the chapters in the generated PDF file.

The e-book version is available now for $42 from Wiley and for $47 from Amazon.


See for the bookmark titles used by the script.

How to generate the book?

Run ./ You will need pystitcher, and wget installed. Alternatively, you can run it using Docker.


docker run --detach --name security-engineering-ebook captn3m0/security-engineering-ebook

docker logs security-engineering-ebook -f
Starting PDF download
All PDFs downloaded
PDF files combined
Bookmarks attached to PDF
PDF File generated: security-engineering-3rd-edition.pdf

docker cp security-engineering-ebook:/security-engineering-ebook/security-engineering-3rd-edition.pdf .

Once the script finishes running, check the security-engineering-3rd-edition.pdf file.

Support the Authors

Buy the second edition of the book from:

A combined PDF of the first edition is available directly from the author at


The list of URLs is maintained at urls.txt and might need to be updated. File a PR if this breaks?


A list of my other EBook generation projects:, includes a link to other related projects as well


The little code in this repo is licensed under the MIT License. See LICENSE file for details.