download_sanitized_file
Download Content Disarm and Reconstruction (CDR) sanitized files from malware analysis submissions to access safe versions of potentially malicious content.
Instructions
Download the CDR-sanitized file for a given submission UUID.
Args: uuid: Submission UUID
Returns: Base64-encoded file content
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes |
Implementation Reference
- src/threatzone_mcp/server.py:608-622 (handler)The handler function for the 'download_sanitized_file' tool, which is also registered via the @app.tool decorator. It downloads the CDR-sanitized version of the analyzed file from the Threat.Zone API endpoint and returns the content as a base64-encoded string.@app.tool async def download_sanitized_file(uuid: str) -> str: """ Download the CDR-sanitized file for a given submission UUID. Args: uuid: Submission UUID Returns: Base64-encoded file content """ import base64 content = await get_client().download(f"/public-api/download/cdr/{uuid}") return base64.b64encode(content).decode('utf-8')