Shodan-mattermost
Based on this project, you will be able to create a simple Slash command to use in Mattermost (and maybe in Slack too) for Shodan.io.
Preview
Pro-tip: For a quick overview, you can spin up a Mattermost Preview instance using Docker (Link to the Hub).
docker run --name mattermost-preview -d --publish 8065:8065 mattermost/mattermost-preview
The instance is then accessible at: http://0.0.0.0:8065
Installation
As soon as your Mattermost instance is up and running, you should go to the System console and enable Custom Slack Commands.
Then, go to Menu > Integrations > Custom Slash Command.
Fill in the information regarding your Slash command appropriately.
Your Slash command has now been created.
Make sure that you copy token generated by Mattermost and edit respectively both tokens (Shodan and Mattermost ones) in mattershodan.py.
SHODAN_API_KEY = "XXXXXXXXXXXXXXXXXXXXXXXX"
MATTERMOST_TOKEN = "YYYYYYYYYYYYYYYYYYYYYYYY"
Usage
Launch your web server:
✗ python mattershodan.py
Starting matterslash server, use <Ctrl-C> to stop
And finally you can start typing your commands in the Mattermost Channel of your choice, like:
/shodan_search_host 115.203.10.170
Contributing
The code has been released under MIT License. Feel free to send your Pull Requests over if you need a specific method. You can also ping me at @PaulWebSec if you need anything.
This code has highly been inspired from MatterSlash source code, available here