Go-based proxy for Shodan API with IP filtering, path blocking, and admin panel for easy management.
970
Shodan Proxy is a Go-based proxy server for Shodan API requests with additional features like IP filtering, path blocking, and an admin panel.
To run the Shodan Proxy container:
docker run -p 8080:8080 liuweitao/shodan-proxy:latest
Access the admin panel at http://localhost:8080/admin to manage settings and API keys.
Default admin credentials:
The container is configured using a config.yaml file. To configure the container, you need to mount a volume containing your config.yaml file.
Example of mounting a configuration file:
docker run -p 8080:8080 -v /path/to/your/config:/app/config liuweitao/shodan-proxy:latest
Note: Ensure that your config.yaml file is properly secured, especially if it contains sensitive information like API keys.
To use Docker Compose for easy deployment, follow these steps:
Create and enter the project directory:
mkdir shodan-proxy && cd shodan-proxy
Download the compose.yaml file:
curl -O https://raw.githubusercontent.com/liuweitao/shodan-proxy/main/compose.yaml
Run the container:
docker compose up -d
This will set up and start the Shodan Proxy container using the configuration specified in the compose.yaml file.
Here are some examples of Shodan API calls, comparing the official API and this proxy's usage:
Search for host information
Official API:
https://api.shodan.io/shodan/host/search?key=YOUR_API_KEY&query=apache
This proxy:
http://localhost:8080/shodan/host/search?query=apache
Get information for a specific IP
Official API:
https://api.shodan.io/shodan/host/1.1.1.1?key=YOUR_API_KEY
This proxy:
http://localhost:8080/shodan/host/1.1.1.1
Get information about the current API plan
Official API:
https://api.shodan.io/api-info?key=YOUR_API_KEY
This proxy:
http://localhost:8080/api-info
Note:
http://localhost:8080/api-info?key=YOUR_API_KEY), the proxy will use the key provided by the caller.
This flexibility allows users to use their own API keys when needed, while also leveraging the proxy's key management functionality.To use the Shodan Proxy with the Shodan CLI, you can modify the API address in the Shodan client library. Execute the following command:
sed -i 's|https://api.shodan.io|http://your-shodan-proxy-address:port|g' ~/.local/lib/python3.9/site-packages/shodan/client.py
Note:
http://localhost:8080 or http://192.168.1.100:8080.~/.local/lib/python3.9/site-packages/shodan/client.py may differ depending on your Python installation. Make sure to use the correct path.After making this modification, you can use the Shodan CLI as usual, but all requests will be routed through your proxy server.
For more information, contributions, or issues, please visit our GitHub repository.
This project is licensed under the MIT License. For full details, please refer to the LICENSE file in our GitHub repository.
If you encounter any issues or have questions, please open an issue on our GitHub repository.
We welcome contributions! Please see our CONTRIBUTING.md file for guidelines on how to contribute to this project.
Content type
Image
Digest
sha256:ac90519f9…
Size
8.6 MB
Last updated
almost 2 years ago
docker pull liuweitao/shodan-proxy