sipg


Namesipg JSON
Version 2.1.1 PyPI version JSON
download
home_pagehttps://github.com/emptymahbob/sipg
SummaryA professional command-line tool for searching IP addresses using Shodan API
upload_time2025-07-10 20:54:08
maintainerNone
docs_urlNone
authorMahbob Alam
requires_python>=3.7
licenseNone
keywords shodan ip grabber security reconnaissance network api
VCS
bugtrack_url
requirements colorama requests click rich
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SIPG - Shodan IP Grabber

[![PyPI version](https://badge.fury.io/py/sipg.svg)](https://badge.fury.io/py/sipg)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

![SIPG Banner](banner.png)

<p align="center"><b>Example Search Result</b></p>
<p align="center"><img src="search%20result.png" alt="Example Search Result" width="700"></p>

A professional command-line tool for searching IP addresses using the Shodan API. SIPG provides an intuitive interface for security researchers, penetration testers, and network administrators to discover and analyze internet-connected devices.

## ✨ Features

- 🔍 **Advanced Search**: Powerful query syntax with support for all Shodan search filters
- 📊 **Rich Output**: Beautiful tables and detailed information display
- 💾 **Flexible Export**: Save results to files in various formats
- ⚡ **Rate Limiting**: Built-in API rate limiting to respect Shodan's limits
- 🔐 **Secure Configuration**: Secure API key storage in user's home directory
- 🌍 **Cross-Platform**: Works on Windows, macOS, and Linux
- 📈 **Progress Tracking**: Real-time progress indicators for long searches
- 🎯 **Multiple Output Formats**: Simple IP lists, detailed results, or formatted tables

## 🚀 Quick Start

### Installation

#### From PyPI (Recommended)
```bash
pip install sipg
```

#### From Source
```bash
git clone https://github.com/emptymahbob/sipg.git
cd sipg
pip install -e .
```

### Configuration

1. Get your Shodan API key from [shodan.io](https://account.shodan.io/)
2. Configure SIPG with your API key:
```bash
sipg configure
```

### Basic Usage

```bash
# Search for IPs with SSL certificates from Uber
sipg search 'ssl:"Uber Technologies Inc"'

# Search with detailed information
sipg search 'http.server:Apache' --details

# Display results in a table format
sipg search 'port:80' --table

# Save results to a file
sipg search 'country:"United States"' -o results.txt

# Limit results and add delay
sipg search 'product:"nginx"' -m 50 -d 2.0

# Get results from pages 2 to 5 (i.e., results 101-500)
sipg search 'http.server:Apache' --details --start-page 2 --end-page 5

# Save results from pages 5 to 10 to a file
sipg search 'country:"United States"' -o us.txt --start-page 5 --end-page 10
```

## 📖 Commands

### `sipg configure`
Configure your Shodan API key securely.

### `sipg search <query>`
Search for IP addresses using Shodan.

**Options:**
- `-o, --output FILE`: Save results to file. If not specified, results are printed to the console. Only IPs are saved for simple output, or detailed JSON for --details.
- `-m, --max-results N`: Maximum number of results to return. Default: all available results.
- `-d, --delay SECONDS`: Delay (in seconds) between API requests to avoid rate limits.
- `--details`: Show detailed results with additional information (organization, location, hostnames, etc).
- `--table`: Display results in a formatted table (implies --details).
- `--start-page N`: Start fetching results from this page (1-based, default: 1).
- `--end-page N`: End fetching results at this page (inclusive). If not set, fetches up to the last available page or max-results.

**How output is saved:**
- By default, results are printed to the console.
- Use `-o/--output` to save results to a file. If `--details` is used, detailed JSON is saved; otherwise, only IPs are saved.
- Use `--max-results` to limit the number of results.
- Use `--start-page` and `--end-page` to fetch results from a specific page range (each page = 100 results).
- Use `--delay` to avoid hitting Shodan rate limits (default: 1.0s).

**Examples:**
```bash
# Get the first 200 results
sipg search 'ssl:"Uber Technologies Inc"' --max-results 200

# Get results from pages 2 to 5 (i.e., results 101-500)
sipg search 'http.server:Apache' --details --start-page 2 --end-page 5

# Save results from pages 5 to 10 to a file
sipg search 'country:"United States"' -o us.txt --start-page 5 --end-page 10
```

### `sipg info`
Show information about your Shodan API key and usage.

### `sipg examples`
Display example search queries.

### `sipg clear`
Clear the stored API key.

## 🔍 Search Query Examples

```bash
# SSL certificates
sipg search 'ssl:"Uber Technologies Inc"'
sipg search 'ssl.cert.subject.CN:"*.uber.com"'

# HTTP servers
sipg search 'http.server:Apache'
sipg search 'http.status:200'

# Geographic location
sipg search 'country:"United States"'
sipg search 'city:"New York"'

# Port scanning
sipg search 'port:80'
sipg search 'port:443'

# Products and services
sipg search 'product:"nginx"'
sipg search 'product:"MySQL"'

# Organizations
sipg search 'org:"Amazon"'
sipg search 'org:"Google"'

# Complex queries
sipg search 'ssl:"Uber Technologies Inc" http.status:200'
sipg search 'port:80 -http.title:"Invalid URL"'
```

## 🛠️ Development

### Setup Development Environment
```bash
git clone https://github.com/emptymahbob/sipg.git
cd sipg
pip install -e ".[dev]"
```

### Run Tests
```bash
pytest
```

### Code Formatting
```bash
black sipg/
```

### Type Checking
```bash
mypy sipg/
```

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## 📞 Support

- **Author**: Mahbob Alam (@emptymahbob)
- **Email**: emptymahbob@gmail.com
- **Twitter**: https://x.com/emptymahbob
- **Issues**: https://github.com/emptymahbob/sipg/issues

## ⚠️ Disclaimer

This tool is for educational and authorized security research purposes only. Always ensure you have proper authorization before scanning any networks or systems. The authors are not responsible for any misuse of this tool.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/emptymahbob/sipg",
    "name": "sipg",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Mahbob Alam <emptymahbob@gmail.com>",
    "keywords": "shodan, ip, grabber, security, reconnaissance, network, api",
    "author": "Mahbob Alam",
    "author_email": "Mahbob Alam <emptymahbob@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bc/d2/edbde2c749681f3de3c7edf125de82b72312a7de2593cf4c9acb85fc7d85/sipg-2.1.1.tar.gz",
    "platform": null,
    "description": "# SIPG - Shodan IP Grabber\r\n\r\n[![PyPI version](https://badge.fury.io/py/sipg.svg)](https://badge.fury.io/py/sipg)\r\n[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n![SIPG Banner](banner.png)\r\n\r\n<p align=\"center\"><b>Example Search Result</b></p>\r\n<p align=\"center\"><img src=\"search%20result.png\" alt=\"Example Search Result\" width=\"700\"></p>\r\n\r\nA professional command-line tool for searching IP addresses using the Shodan API. SIPG provides an intuitive interface for security researchers, penetration testers, and network administrators to discover and analyze internet-connected devices.\r\n\r\n## \u2728 Features\r\n\r\n- \ud83d\udd0d **Advanced Search**: Powerful query syntax with support for all Shodan search filters\r\n- \ud83d\udcca **Rich Output**: Beautiful tables and detailed information display\r\n- \ud83d\udcbe **Flexible Export**: Save results to files in various formats\r\n- \u26a1 **Rate Limiting**: Built-in API rate limiting to respect Shodan's limits\r\n- \ud83d\udd10 **Secure Configuration**: Secure API key storage in user's home directory\r\n- \ud83c\udf0d **Cross-Platform**: Works on Windows, macOS, and Linux\r\n- \ud83d\udcc8 **Progress Tracking**: Real-time progress indicators for long searches\r\n- \ud83c\udfaf **Multiple Output Formats**: Simple IP lists, detailed results, or formatted tables\r\n\r\n## \ud83d\ude80 Quick Start\r\n\r\n### Installation\r\n\r\n#### From PyPI (Recommended)\r\n```bash\r\npip install sipg\r\n```\r\n\r\n#### From Source\r\n```bash\r\ngit clone https://github.com/emptymahbob/sipg.git\r\ncd sipg\r\npip install -e .\r\n```\r\n\r\n### Configuration\r\n\r\n1. Get your Shodan API key from [shodan.io](https://account.shodan.io/)\r\n2. Configure SIPG with your API key:\r\n```bash\r\nsipg configure\r\n```\r\n\r\n### Basic Usage\r\n\r\n```bash\r\n# Search for IPs with SSL certificates from Uber\r\nsipg search 'ssl:\"Uber Technologies Inc\"'\r\n\r\n# Search with detailed information\r\nsipg search 'http.server:Apache' --details\r\n\r\n# Display results in a table format\r\nsipg search 'port:80' --table\r\n\r\n# Save results to a file\r\nsipg search 'country:\"United States\"' -o results.txt\r\n\r\n# Limit results and add delay\r\nsipg search 'product:\"nginx\"' -m 50 -d 2.0\r\n\r\n# Get results from pages 2 to 5 (i.e., results 101-500)\r\nsipg search 'http.server:Apache' --details --start-page 2 --end-page 5\r\n\r\n# Save results from pages 5 to 10 to a file\r\nsipg search 'country:\"United States\"' -o us.txt --start-page 5 --end-page 10\r\n```\r\n\r\n## \ud83d\udcd6 Commands\r\n\r\n### `sipg configure`\r\nConfigure your Shodan API key securely.\r\n\r\n### `sipg search <query>`\r\nSearch for IP addresses using Shodan.\r\n\r\n**Options:**\r\n- `-o, --output FILE`: Save results to file. If not specified, results are printed to the console. Only IPs are saved for simple output, or detailed JSON for --details.\r\n- `-m, --max-results N`: Maximum number of results to return. Default: all available results.\r\n- `-d, --delay SECONDS`: Delay (in seconds) between API requests to avoid rate limits.\r\n- `--details`: Show detailed results with additional information (organization, location, hostnames, etc).\r\n- `--table`: Display results in a formatted table (implies --details).\r\n- `--start-page N`: Start fetching results from this page (1-based, default: 1).\r\n- `--end-page N`: End fetching results at this page (inclusive). If not set, fetches up to the last available page or max-results.\r\n\r\n**How output is saved:**\r\n- By default, results are printed to the console.\r\n- Use `-o/--output` to save results to a file. If `--details` is used, detailed JSON is saved; otherwise, only IPs are saved.\r\n- Use `--max-results` to limit the number of results.\r\n- Use `--start-page` and `--end-page` to fetch results from a specific page range (each page = 100 results).\r\n- Use `--delay` to avoid hitting Shodan rate limits (default: 1.0s).\r\n\r\n**Examples:**\r\n```bash\r\n# Get the first 200 results\r\nsipg search 'ssl:\"Uber Technologies Inc\"' --max-results 200\r\n\r\n# Get results from pages 2 to 5 (i.e., results 101-500)\r\nsipg search 'http.server:Apache' --details --start-page 2 --end-page 5\r\n\r\n# Save results from pages 5 to 10 to a file\r\nsipg search 'country:\"United States\"' -o us.txt --start-page 5 --end-page 10\r\n```\r\n\r\n### `sipg info`\r\nShow information about your Shodan API key and usage.\r\n\r\n### `sipg examples`\r\nDisplay example search queries.\r\n\r\n### `sipg clear`\r\nClear the stored API key.\r\n\r\n## \ud83d\udd0d Search Query Examples\r\n\r\n```bash\r\n# SSL certificates\r\nsipg search 'ssl:\"Uber Technologies Inc\"'\r\nsipg search 'ssl.cert.subject.CN:\"*.uber.com\"'\r\n\r\n# HTTP servers\r\nsipg search 'http.server:Apache'\r\nsipg search 'http.status:200'\r\n\r\n# Geographic location\r\nsipg search 'country:\"United States\"'\r\nsipg search 'city:\"New York\"'\r\n\r\n# Port scanning\r\nsipg search 'port:80'\r\nsipg search 'port:443'\r\n\r\n# Products and services\r\nsipg search 'product:\"nginx\"'\r\nsipg search 'product:\"MySQL\"'\r\n\r\n# Organizations\r\nsipg search 'org:\"Amazon\"'\r\nsipg search 'org:\"Google\"'\r\n\r\n# Complex queries\r\nsipg search 'ssl:\"Uber Technologies Inc\" http.status:200'\r\nsipg search 'port:80 -http.title:\"Invalid URL\"'\r\n```\r\n\r\n## \ud83d\udee0\ufe0f Development\r\n\r\n### Setup Development Environment\r\n```bash\r\ngit clone https://github.com/emptymahbob/sipg.git\r\ncd sipg\r\npip install -e \".[dev]\"\r\n```\r\n\r\n### Run Tests\r\n```bash\r\npytest\r\n```\r\n\r\n### Code Formatting\r\n```bash\r\nblack sipg/\r\n```\r\n\r\n### Type Checking\r\n```bash\r\nmypy sipg/\r\n```\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nContributions are welcome! Please feel free to submit a Pull Request.\r\n\r\n## \ud83d\udcde Support\r\n\r\n- **Author**: Mahbob Alam (@emptymahbob)\r\n- **Email**: emptymahbob@gmail.com\r\n- **Twitter**: https://x.com/emptymahbob\r\n- **Issues**: https://github.com/emptymahbob/sipg/issues\r\n\r\n## \u26a0\ufe0f Disclaimer\r\n\r\nThis tool is for educational and authorized security research purposes only. Always ensure you have proper authorization before scanning any networks or systems. The authors are not responsible for any misuse of this tool.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A professional command-line tool for searching IP addresses using Shodan API",
    "version": "2.1.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/emptymahbob/sipg/issues",
        "Documentation": "https://github.com/emptymahbob/sipg#readme",
        "Homepage": "https://github.com/emptymahbob/sipg",
        "Repository": "https://github.com/emptymahbob/sipg"
    },
    "split_keywords": [
        "shodan",
        " ip",
        " grabber",
        " security",
        " reconnaissance",
        " network",
        " api"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4d0af59f75053f5056466021ef398528ffe258bbaf73faa717601cca083663ec",
                "md5": "234624f3bf91a1678b78f0d67a9e7477",
                "sha256": "8b24ee4be79372672bd1983bcee473c4a43ee25ef1191d15c74eb28483bb4a85"
            },
            "downloads": -1,
            "filename": "sipg-2.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "234624f3bf91a1678b78f0d67a9e7477",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 13486,
            "upload_time": "2025-07-10T20:54:05",
            "upload_time_iso_8601": "2025-07-10T20:54:05.850226Z",
            "url": "https://files.pythonhosted.org/packages/4d/0a/f59f75053f5056466021ef398528ffe258bbaf73faa717601cca083663ec/sipg-2.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bcd2edbde2c749681f3de3c7edf125de82b72312a7de2593cf4c9acb85fc7d85",
                "md5": "a41d159994e0f99ab06377d07d68705b",
                "sha256": "2e598e75e17539e675b5ffd6b8196a81694524028a3718658274bf56a1265d98"
            },
            "downloads": -1,
            "filename": "sipg-2.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a41d159994e0f99ab06377d07d68705b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 2584358,
            "upload_time": "2025-07-10T20:54:08",
            "upload_time_iso_8601": "2025-07-10T20:54:08.766942Z",
            "url": "https://files.pythonhosted.org/packages/bc/d2/edbde2c749681f3de3c7edf125de82b72312a7de2593cf4c9acb85fc7d85/sipg-2.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-10 20:54:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "emptymahbob",
    "github_project": "sipg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "colorama",
            "specs": [
                [
                    ">=",
                    "0.4.4"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.26.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    ">=",
                    "8.0.0"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    ">=",
                    "12.0.0"
                ]
            ]
        }
    ],
    "lcname": "sipg"
}
        
Elapsed time: 0.75346s