
Una pagina ospitata localmente per cheat sheet. Attualmente utilizzata per il reverse engineering e ospitata in laboratori in modo da poter limitare o rinunciare (bloccare il firewall) al traffico esterno alle istanze.
Un server web leggero e guidato dai contenuti per ospitare cheat sheet interattivi e materiali di riferimento. Perfetto per sfide CTF (Capture The Flag), reverse engineering e documentazione tecnica. È ideale per ambienti di laboratorio in cui si vuole limitare o evitare il traffico esterno pur avendo accesso a materiale utile.
*** Ho irrobustito un po' lo script, ma dovresti revisionarlo prima dell'uso e/o distribuirlo in un ambiente di laboratorio ***
Clona o scarica questo repository:
git clone https://github.com/JimmyAder/CheatSheetHost.git
cd CheatSheetHost
Avvia il server:
python3 host_content_site.py
Apri il browser su http://127.0.0.1:8766
Il server creerà automaticamente i file predefiniti se non esistono.
http://127.0.0.1:8766http://[tuo-ip-locale]:8766 (mostrato all'avvio)GET /api/pages: Restituisce un elenco JSON degli slug delle pagine disponibiliI cheat sheet sono salvati come file JSON nella directory pages/. Ogni file definisce una singola pagina con la seguente struttura:
{
"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 determina il percorso URL (generato automaticamente dal nome file se omesso)Modifica site_template.html per modificarne l'aspetto:
:root per colori e layoutOpzioni da riga di comando:
python3 host_content_site.py --host 0.0.0.0 --port 8080
--host: Indirizzo IP a cui associarsi (predefinito: 0.0.0.0)--port: Numero di porta (predefinito: 8766)CheatSheetHost/
├── host_content_site.py # Script principale del server
├── site_template.html # Template HTML e CSS
├── pages/ # File JSON dei cheat sheet
│ ├── ctf-cheatsheet.json
│ ├── gdb-cheatsheet.json
│ └── ...
└── README.md # Questo file
pages/http.server di Pythonpython3 host_content_site.py
site_template.html per modifiche stilisticheQuesto progetto è open source. Sentiti libero di usarlo, modificarlo e distribuirlo.