How youssefbakrey/web_offlinea works
Bartender accepts a URL through its PHP service, checks it, asks the internal Flask scraper to render it as a PDF, then redirects the user to the generated file. The Flask service also records URL history and submitted secrets, exposes logs, and provides a token-protected secrets endpoint. Database initialization seeds a secret from the flag file. The README is empty; edges below are based on the shown PHP and Python excerpts, so unsampled page behavior is not inferred.
Main entry points: bartender.php URL gate · app.py Flask API · pdfs PDF files · init_db.py Database setup
Components 13
Web entry
- URL gate
challenge/service/bartender.php - Landing page
challenge/service/index.html
Scrape service
- Flask API
challenge/internal/app.py - URL safety checks
challenge/internal/app.py - Browser rendering
challenge/internal/app.py - History logs
challenge/internal/app.py - Secret access
challenge/internal/app.py
Persistent state
- Database setup
challenge/internal/init_db.py - SQLite store
User outputs
- PDF files
challenge/service/pdfs - Log template
challenge/internal/templates/bartender.html - Rejection PDF
challenge/service/pdfs/no_way.pdf
Other components
- Visitor
Connections 15
- Visitor → URL gate: submits URL
challenge/service/bartender.php - Visitor → Landing page: opens page
- URL gate → Flask API: requests scrape
challenge/service/bartender.php - URL gate → Rejection PDF: redirects on failure
challenge/service/bartender.php - URL gate → PDF files: redirects to result
challenge/service/bartender.php - Flask API → URL safety checks: checks URL
challenge/internal/app.py - Flask API → Browser rendering: renders URL
challenge/internal/app.py - URL safety checks → Browser rendering: permits fetch
challenge/internal/app.py - Browser rendering → PDF files: writes PDF
challenge/internal/app.py - Browser rendering → SQLite store: records URL
challenge/internal/app.py - Flask API → SQLite store: stores secret
challenge/internal/app.py - History logs → SQLite store: reads history
challenge/internal/app.py - History logs → Log template: renders logs
challenge/internal/app.py - Secret access → SQLite store: reads secrets
challenge/internal/app.py - Database setup → SQLite store: creates and seeds
challenge/internal/init_db.py