(interaction: discord.Interaction)
| 711 | |
| 712 | @client.tree.command(name="help", description="Displays a list of available commands.") |
| 713 | async def help_command(interaction: discord.Interaction): |
| 714 | embed = discord.Embed(title="Available Commands", description="Here are the commands you can use:", color=0x3498db) |
| 715 | |
| 716 | # Basic Commands Header |
| 717 | embed.add_field(name="🟢 Basic Commands", value="Commands for common tasks.", inline=False) |
| 718 | |
| 719 | basic_commands_description = "\n".join([ |
| 720 | f"{command}: {description}" |
| 721 | for command, description in { |
| 722 | "/shodan": "General use of shodan. This is the main command.", |
| 723 | "/hostinfo": "Get information about a host.", |
| 724 | "/protocols": "List supported protocols.", |
| 725 | "/searchcity": "Search Shodan by city.", |
| 726 | "/searchorg": "Search Shodan by organization.", |
| 727 | "/searchport": "Search Shodan by port.", |
| 728 | "/searchcountry": "Search Shodan by country.", |
| 729 | "/exploitsearch": "Search for known vulnerabilities using a term.", |
| 730 | "/listtags": "List popular tags.", |
| 731 | "/searchnetblock": "Search devices in a specific netblock.", |
| 732 | "/searchproduct": "Search devices associated with a specific product.", |
| 733 | "/searchssl": "Search for domains associated with a specific SSL certificate hash.", |
| 734 | "/searchisp": "Search devices associated with a specific ISP.", |
| 735 | "/searchgeo": "Search devices around specific GPS coordinates." |
| 736 | }.items() |
| 737 | ]) |
| 738 | embed.add_field(name="Commands & Descriptions", value=basic_commands_description, inline=False) |
| 739 | |
| 740 | # Advanced Search Command Header |
| 741 | embed.add_field(name="🔴 Advanced Command", value="**Command**: \n`/shodan\nSearch Shodan. All options will be provided.", inline=False) |
| 742 | |
| 743 | embed.add_field(name="Examples of Basic Searches", value=( |
| 744 | "- Single IP: `192.168.1.1`\n" |
| 745 | "- Domain: `example.com`\n" |
| 746 | "- Product/Service: `nginx`" |
| 747 | ), inline=False) |
| 748 | |
| 749 | embed.add_field(name="Examples of Advanced Queries", value=( |
| 750 | "- IP Range: `ip:18.9.47.0-18.9.47.255`\n" |
| 751 | "- Network: `net:18.9.47.0/24`\n" |
| 752 | "- SSL Cert Subject: `ssl.cert.subject.cn:stellar.mit.edu`\n" |
| 753 | "- Headers & HTML:\n" |
| 754 | " - By Title: `http.title:\"Massachusetts Institute of Technology\"` - Searches for specific titles in HTTP responses.\n" |
| 755 | " - By HTML Content: `http.html:'ua-1592615'` - Looks within the content of HTML pages.\n" |
| 756 | "- Webcams & IoT:\n" |
| 757 | " - Search for vulnerable cams like `wyze`, `webcamxp 5`, or more specific like:\n" |
| 758 | " - \"`Server:yawcam\" \"Mime-Type:text/html`\"\n" |
| 759 | " - Webcam in ASN: `screenshot.label:webcam asn:AS45102`\n" |
| 760 | " - With Screenshot: `has_screenshot:true`" |
| 761 | ), inline=False) |
| 762 | |
| 763 | await interaction.response.send_message(embed=embed, ephemeral=False) |
| 764 | |
| 765 | if __name__ == "__main__": |
| 766 | config = load_config() |
nothing calls this directly
no outgoing calls
no test coverage detected