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

Function wardriving_status

webapp_modern.py:8155–8167  ·  view source on GitHub ↗

Get wardriving engine status.

()

Source from the content-addressed store, hash-verified

8153
8154@app.route('/api/config/export', methods=['GET'])
8155def export_config():
8156 """Download the current config as a portable JSON for fleet deployment."""
8157 try:
8158 payload = _build_config_export()
8159 body = json.dumps(payload, indent=2, default=str)
8160 stamp = datetime.now().strftime('%Y%m%d-%H%M%S')
8161 fname = f"ragnar-config-{socket.gethostname()}-{stamp}.json"
8162 # octet-stream (not application/json) so iOS Safari downloads the file
8163 # instead of previewing it inline; nosniff keeps other browsers from
8164 # second-guessing that.
8165 resp = Response(body, mimetype='application/octet-stream')
8166 resp.headers['Content-Disposition'] = f'attachment; filename="{fname}"'
8167 resp.headers['X-Content-Type-Options'] = 'nosniff'
8168 return resp
8169 except Exception as e:
8170 logger.error(f"Error exporting config: {e}")

Callers

nothing calls this directly

Calls 4

_get_wardriving_engineFunction · 0.85
errorMethod · 0.80
getMethod · 0.45
get_statusMethod · 0.45

Tested by

no test coverage detected