Skip to content

Export the book artifact from the GitHub build workflow as a release for easy offline access #1022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tom-HCgY7HY6kq opened this issue Apr 19, 2025 · 2 comments

Comments

@tom-HCgY7HY6kq
Copy link

Instead of needing all offline users to build the container themselves, would it be possible to export the book directory artifact that is already being built in GH actions and sent to the S3 bucket as a release for the repo?

This would make it easier for users to access offline by just starting a simple Python HTTP server in the downloaded book directory rather than needing to build and run a container.

@tom-HCgY7HY6kq
Copy link
Author

Also (following this useful guide: https://punksecurity.co.uk/blog/crestdrive_preparation_guide/) search is broken in offline access without this patch. This could be something added to the release to make search work offline:

--- theme/ht_searcher.js
+++ theme/ht_searcher.js
@@ -474,10 +474,10 @@
     var branch = lang === "en" ? "master" : lang
-    fetch(`https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/refs/heads/${branch}/searchindex.json`)
+    fetch(`searchindex.json`)
         .then(response => response.json())
         .then(json => init(json))        
         .catch(error => { // Try to load searchindex.js if fetch failed
             var script = document.createElement('script');
-            script.src = `https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/refs/heads/${branch}/searchindex.js`;
+            script.src = `searchindex.js`;
             script.onload = () => init(window.search);
             document.head.appendChild(script);
         });

Very happy to make a PR myself if you would accept the merge?

@carlospolop
Copy link
Collaborator

Hi @tom-HCgY7HY6kq !
The offline access should be fixed now.
Regarding the container we are not interested in hosting the image in our AWS infra. We could consider doing something like this storing it in dockerhub or github. Would you be able to do a PR for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants