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

Function run_paste_osint

openosint/tools/search_paste.py:69–101  ·  view source on GitHub ↗

Search Pastebin dumps for query via psbdmp.ws. Returns a descriptive error string on failure rather than raising. Parameters ---------- query: Email address or username to search for. timeout_seconds: HTTP request timeout in seconds. Returns ------

(
    query: str,
    timeout_seconds: int = _DEFAULT_TIMEOUT,
)

Source from the content-addressed store, hash-verified

67
68
69async def run_paste_osint(
70 query: str,
71 timeout_seconds: int = _DEFAULT_TIMEOUT,
72) -> str:
73 """
74 Search Pastebin dumps for query via psbdmp.ws.
75
76 Returns a descriptive error string on failure rather than raising.
77
78 Parameters
79 ----------
80 query:
81 Email address or username to search for.
82 timeout_seconds:
83 HTTP request timeout in seconds.
84
85 Returns
86 -------
87 str
88 Formatted result string or a descriptive error message.
89 """
90 logger.info("Starting paste search for: %s", query)
91 try:
92 pastes = _fetch_paste_data(query, timeout_seconds)
93 result = _format_paste_results(pastes, query)
94 logger.info("Paste search complete for: %s", query)
95 return result
96 except OSINTError as exc:
97 logger.warning("Paste search failed: %s", exc)
98 return f"Scan error: {exc}"
99 except Exception as exc:
100 logger.exception("Unexpected error during paste search.")
101 return f"Internal error: {exc}"

Callers 4

_handle_usernameFunction · 0.90
web_server.pyFile · 0.90
agent.pyFile · 0.90
mcp_server.pyFile · 0.90

Calls 2

_fetch_paste_dataFunction · 0.85
_format_paste_resultsFunction · 0.85

Tested by

no test coverage detected