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

Function _network_context_from_request

webapp_modern.py:1882–1902  ·  view source on GitHub ↗

Temporarily switch shared data to the network requested by the client.

()

Source from the content-addressed store, hash-verified

1880
1881
1882@app.route('/api/net/integrity', methods=['GET'])
1883def net_integrity_status():
1884 """Last verdict from the passive network-integrity monitor (for the
1885 dashboard chip). Reflects config even when the monitor hasn't run yet."""
1886 with _net_integrity_lock:
1887 state = dict(_net_integrity_state)
1888 state['monitor_enabled'] = bool(shared_data.config.get('net_integrity_monitor_enabled', False))
1889 state['interval_min'] = shared_data.config.get('net_integrity_interval_min', 5)
1890 state['extended_enabled'] = bool(shared_data.config.get('net_integrity_extended_enabled', True))
1891 state['batch_size'] = shared_data.config.get('net_integrity_batch_size', 3)
1892 state['interface'] = shared_data.config.get('net_integrity_interface', '') or ''
1893 return jsonify({'success': True, **state})
1894
1895
1896# ==========================================================================
1897# Watchtower — unified alert pane for the standalone passive watchers.
1898# The deep daemons (arp_guard, ndpwatch, wifiwatch, certwatch, snmpwatch,
1899# isiswatch, igmpwatch) each write their own JSON-lines log; Watchtower tails
1900# them all, normalizes into one shape, shows them in one pane, and pages the
1901# high/critical ones through a single deduped Pushover path. Read-only over the
1902# logs — it captures nothing. Opt-in via watchtower_enabled.
1903# ==========================================================================
1904
1905_watchtower_lock = threading.Lock()

Callers 14

get_stable_network_dataFunction · 0.85
get_networkFunction · 0.85
get_network_topologyFunction · 0.85
get_credentialsFunction · 0.85
get_lootFunction · 0.85
get_vulnerability_intelFunction · 0.85
get_enriched_findingsFunction · 0.85
enrich_finding_endpointFunction · 0.85
enrich_target_endpointFunction · 0.85

Calls 5

_normalize_network_slugFunction · 0.85
activateMethod · 0.80
warningMethod · 0.80
popMethod · 0.80

Tested by

no test coverage detected