MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / wardriving_import_csv

Function wardriving_import_csv

webapp_modern.py:8301–8335  ·  view source on GitHub ↗

Import a WiGLE CSV file into the current or a new wardriving session.

()

Source from the content-addressed store, hash-verified

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')
8304def 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')
8311def 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')
8322def 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>')
8333def 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'):

Callers

nothing calls this directly

Calls 7

import_wigle_csvMethod · 0.95
closeMethod · 0.95
WardrivingSessionClass · 0.90
_get_wardriving_engineFunction · 0.85
errorMethod · 0.80
decodeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected