MCPcopy Index your code
hub / github.com/OpenOSINT/OpenOSINT / _handle_username

Function _handle_username

openosint/cli.py:453–482  ·  view source on GitHub ↗
(
    target: str,
    timeout: int,
    is_parallel: bool = False,
    json_output: bool = False,
)

Source from the content-addressed store, hash-verified

451
452
453async def _handle_username(
454 target: str,
455 timeout: int,
456 is_parallel: bool = False,
457 json_output: bool = False,
458) -> None:
459 if is_parallel:
460 print(f"[*] Username scan (parallel): {target}", file=sys.stderr)
461 username_result, paste_result = await asyncio.gather(
462 run_username_osint(username=target, timeout_seconds=timeout),
463 run_paste_osint(query=target),
464 )
465 if json_output:
466 _emit_json(
467 [
468 format_tool_result("search_username", target, username_result),
469 format_tool_result("search_paste", target, paste_result),
470 ]
471 )
472 else:
473 _print_result_labeled("search_username", username_result)
474 _print_result_labeled("search_paste", paste_result)
475 else:
476 print(f"[*] Username scan: {target}", file=sys.stderr)
477 print(f"[*] Timeout: {timeout}s\n", file=sys.stderr)
478 result = await run_username_osint(username=target, timeout_seconds=timeout)
479 if json_output:
480 _emit_json(format_tool_result("search_username", target, result))
481 else:
482 _print_result(result)
483
484
485async def _handle_shodan(

Callers 1

_async_mainFunction · 0.85

Calls 6

run_username_osintFunction · 0.90
run_paste_osintFunction · 0.90
format_tool_resultFunction · 0.90
_emit_jsonFunction · 0.85
_print_result_labeledFunction · 0.85
_print_resultFunction · 0.70

Tested by

no test coverage detected