MCPcopy Create free account
hub / github.com/OpenOSINT/OpenOSINT / _format_paste_results

Function _format_paste_results

openosint/tools/search_paste.py:52–66  ·  view source on GitHub ↗

Return a structured string describing paste search findings.

(pastes: list[dict], query: str)

Source from the content-addressed store, hash-verified

50
51
52def _format_paste_results(pastes: list[dict], query: str) -> str:
53 """Return a structured string describing paste search findings."""
54 if not pastes:
55 return f"No pastes found mentioning '{query}'."
56
57 count = len(pastes)
58 shown = pastes[:_MAX_RESULTS]
59 lines = [f"Found in {count} paste(s) for '{query}':\n"]
60 for paste in shown:
61 paste_id = paste.get("id", "unknown")
62 date = paste.get("time", "unknown date")
63 lines.append(f"[+] https://pastebin.com/{paste_id} ({date})")
64 if count > _MAX_RESULTS:
65 lines.append(f"\n... and {count - _MAX_RESULTS} more.")
66 return "\n".join(lines)
67
68
69async def run_paste_osint(

Callers 3

run_paste_osintFunction · 0.85

Calls

no outgoing calls

Tested by 2