MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / tools_get_screenshot

Function tools_get_screenshot

Scripts/Developer Base/Free Internet.py:1305–1310  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

1303
1304@app.route("/tools/screenshot/<path:filename>")
1305def tools_get_screenshot(filename: str):
1306 path = (SCREENSHOT_DIR / filename).resolve()
1307 if path.parent != SCREENSHOT_DIR.resolve() or not path.exists():
1308 return Response("Not found", status=404)
1309 as_download = request.args.get("download") == "1"
1310 return send_file(path, mimetype="image/png", as_attachment=as_download, download_name=path.name)
1311
1312
1313@app.route("/tools/screenshot/delete/<path:filename>", methods=["POST"])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected