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

Function _clamp_int

network_diagnostics.py:55–60  ·  view source on GitHub ↗
(val, default, lo, hi)

Source from the content-addressed store, hash-verified

53try:
54 from flask import request, jsonify
55except Exception: # pragma: no cover - flask always present in the app
56 request = None
57 jsonify = None
58
59# --------------------------------------------------------------------------
60# Input validation — these endpoints run system commands, so user-supplied
61# targets/interfaces are strictly validated. Commands are always invoked with
62# an argument list (never shell=True), and a leading '-' is rejected so a
63# target can't be smuggled in as a tool flag.

Callers 8

do_pingFunction · 0.85
do_tracerouteFunction · 0.85
do_mtrFunction · 0.85
do_iperf3_clientFunction · 0.85
do_locate_portFunction · 0.85
do_l2_healthFunction · 0.85
do_flow_telemetryFunction · 0.85
do_ptp_detectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected