
A locally hosted page for cheat sheets. Currently being used for reverse engineering and hosted in labs so I can limit or forgo (lock down firewall) traffic outside the instance(s)
A lightweight, content-driven web server for hosting interactive cheatsheets and reference materials. Perfect for CTF (Capture The Flag) challenges, reverse engineering, and technical documentation. This is best used in labs where you want to limit or forgo external traffic while still having access to materal that is helpful.
*** I have hardened the script some but you should review before use and/or deploy in a lab enviroment ***
Clone or download this repository:
git clone https://github.com/JimmyAder/CheatSheetHost.git
cd CheatSheetHost
Run the server:
python3 host_content_site.py
Open your browser to http://127.0.0.1:8766
The server will automatically create default files if they don't exist.
http://127.0.0.1:8766http://[your-local-ip]:8766 (displayed on startup)GET /api/pages: Returns JSON list of available page slugsCheatsheets are stored as JSON files in the pages/ directory. Each file defines a single page with the following structure:
{
"slug": "my-cheatsheet",
"title": "My Custom Cheatsheet",
"subtitle": "A brief description of this cheatsheet",
"sections": [
{
"type": "table",
"title": "Section Title",
"items": [
{"key": "Command", "value": "Description"},
{"key": "Another", "value": "Command"}
]
},
{
"type": "text",
"title": "Notes",
"text": "Some explanatory text here."
},
{
"type": "code",
"title": "Example Code",
"language": "python",
"code": "print('Hello, World!')"
}
],
"ascii": {
"title": "ASCII Table",
"blocks_across": 6,
"min_width_px": 920
}
}
gdb-cheatsheet.json)slug field determines the URL path (auto-generated from filename if omitted)Edit site_template.html to modify the appearance:
:root for colors and layoutCommand-line options:
python3 host_content_site.py --host 0.0.0.0 --port 8080
--host: IP address to bind to (default: 0.0.0.0)--port: Port number (default: 8766)CheatSheetHost/
├── host_content_site.py # Main server script
├── site_template.html # HTML template and CSS
├── pages/ # Cheatsheet JSON files
│ ├── ctf-cheatsheet.json
│ ├── gdb-cheatsheet.json
│ └── ...
└── README.md # This file
pages/ directoryhttp.server modulepython3 host_content_site.py
site_template.html for styling changesThis project is open source. Feel free to use, modify, and distribute.