fetch_pcap_file
Retrieve a stopped packet capture's pcapng file as a binary blob for analysis in Wireshark or tshark. Specify the capture ID or a path inside the managed capture directory to download the complete capture.
Instructions
Fetch a non-streaming capture's pcapng file as a binary blob.
Returns the raw pcapng file (mime application/vnd.tcpdump.pcapng) for the capture named by capture_id (preferred) or by an explicit on-device path. Open it in Wireshark/tshark for analysis. Fetch after the capture has stopped for a complete file; fetching a still-running capture returns only the bytes written so far.
For safety this reads only files under the server's managed capture directory; any other path is refused.
Args: capture_id: The capture_id from start_pcap_file/list_pcap_files. path: Alternatively, the on-device file path (must be inside the managed capture directory). session_id: Deprecated alias for capture_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| capture_id | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |