MCPcopy Create free account
hub / github.com/RocketGod-git/shodanbot / hostinfo

Function hostinfo

main.py:499–506  ·  view source on GitHub ↗
(interaction: discord.Interaction, host_ip: str)

Source from the content-addressed store, hash-verified

497
498 @client.tree.command(name="hostinfo", description="Get information about a host.")
499 async def hostinfo(interaction: discord.Interaction, host_ip: str):
500 try:
501 host_info = client.shodan.host(host_ip)
502 await client.send_split_messages(interaction, f"IP: {host_info['ip_str']}\nOS: {host_info.get('os', 'Unknown')}")
503 except shodan.APIError as e:
504 await handle_errors(interaction, e, "Shodan API Error")
505 except Exception as e:
506 await handle_errors(interaction, e)
507
508 @client.tree.command(name="protocols", description="List supported protocols.")
509 async def protocols(interaction: discord.Interaction):

Callers

nothing calls this directly

Calls 2

handle_errorsFunction · 0.85
send_split_messagesMethod · 0.80

Tested by

no test coverage detected