Import a WiGLE CSV file into the current or a new wardriving session.
()
| 8299 | """Explicit captive portal route""" |
| 8300 | return send_from_directory('web', 'captive_portal.html') |
| 8301 | |
| 8302 | # WiFi configuration page route |
| 8303 | @app.route('/wifi-config') |
| 8304 | def wifi_config_page(): |
| 8305 | """Serve the Wi-Fi configuration page for AP clients and regular users""" |
| 8306 | return send_from_directory('web', 'wifi_config.html') |
| 8307 | |
| 8308 | # Alternative routes for WiFi config (for compatibility) |
| 8309 | @app.route('/wifi') |
| 8310 | @app.route('/setup') |
| 8311 | def wifi_config_alt(): |
| 8312 | """Alternative routes for Wi-Fi configuration""" |
| 8313 | return send_from_directory('web', 'wifi_config.html') |
| 8314 | |
| 8315 | |
| 8316 | # Captive portal detection routes for mobile devices |
| 8317 | @app.route('/generate_204') |
| 8318 | @app.route('/gen_204') |
| 8319 | @app.route('/connecttest.txt') |
| 8320 | @app.route('/success.txt') |
| 8321 | @app.route('/ncsi.txt') |
| 8322 | def captive_portal_detection(): |
| 8323 | """Handle captive portal detection requests from mobile devices""" |
| 8324 | if is_ap_client_request(): |
| 8325 | # Redirect to captive portal for AP clients |
| 8326 | return '''<html><head><meta http-equiv="refresh" content="0; url=/portal"></head><body><a href="/portal">Click here for WiFi setup</a></body></html>''', 302 |
| 8327 | else: |
| 8328 | # Return success for non-AP clients |
| 8329 | return "Success", 204 |
| 8330 | |
| 8331 | |
| 8332 | @app.route('/<path:filename>') |
| 8333 | def serve_static(filename): |
| 8334 | """Serve static files from web directory""" |
| 8335 | resp = make_response(send_from_directory('web', filename)) |
| 8336 | # Keep the manifest and top-level HTML fresh so rebrands (title/PWA name) |
| 8337 | # aren't pinned by a stale browser or installed-PWA cache. |
| 8338 | if filename == 'manifest.json' or filename.endswith('.html'): |
nothing calls this directly
no test coverage detected