MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / tg_get_intelligence_logs

Function tg_get_intelligence_logs

IntelOSINT.py:501–512  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

499
500@app.route('/api/tg/get_intelligence_logs', methods=['POST'])
501def tg_get_intelligence_logs():
502 denied = require_sensitive_request("tg_get_logs", limit=60, window=60)
503 if denied:
504 return denied
505 target = request.json.get('target')
506 safe_id = "".join(c for c in str(target) if c.isalnum() or c in ('_', '-'))
507 log_file = f"TG_Monitor_{safe_id}.txt"
508 if os.path.exists(log_file):
509 with open(log_file, "r", encoding="utf-8") as f:
510 lines = f.readlines()
511 return jsonify({"status": "ok", "logs": lines})
512 return jsonify({"status": "error", "logs": []})
513
514@app.route('/api/tg/export_report', methods=['GET'])
515def tg_export_report():

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected