shodan


Nameshodan JSON
Version 1.31.0 PyPI version JSON
download
home_pagehttps://github.com/achillean/shodan-python
SummaryPython library and command-line utility for Shodan (https://developer.shodan.io)
upload_time2023-12-17 01:42:02
maintainer
docs_urlNone
authorJohn Matherly
requires_python
license
keywords security network
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            shodan: The official Python library and CLI for Shodan
======================================================

.. image:: https://img.shields.io/pypi/v/shodan.svg
    :target: https://pypi.org/project/shodan/

.. image:: https://img.shields.io/github/contributors/achillean/shodan-python.svg
    :target: https://github.com/achillean/shodan-python/graphs/contributors

Shodan is a search engine for Internet-connected devices. Google lets you search for websites,
Shodan lets you search for devices. This library provides developers easy access to all of the
data stored in Shodan in order to automate tasks and integrate into existing tools.

Features
--------

- Search Shodan
- `Fast/ bulk IP lookups <https://help.shodan.io/developer-fundamentals/looking-up-ip-info>`_
- Streaming API support for real-time consumption of Shodan firehose
- `Network alerts (aka private firehose) <https://help.shodan.io/guides/how-to-monitor-network>`_
- `Manage Email Notifications <https://asciinema.org/a/7WvyDtNxn0YeNU70ozsxvXDmL>`_
- Exploit search API fully implemented
- Bulk data downloads
- Access the Shodan DNS DB to view domain information
- `Command-line interface <https://cli.shodan.io>`_

.. image:: https://cli.shodan.io/img/shodan-cli-preview.png
    :target: https://asciinema.org/~Shodan
    :width: 400px
    :align: center


Quick Start
-----------

.. code-block:: python

    from shodan import Shodan

    api = Shodan('MY API KEY')

    # Lookup an IP
    ipinfo = api.host('8.8.8.8')
    print(ipinfo)

    # Search for websites that have been "hacked"
    for banner in api.search_cursor('http.title:"hacked by"'):
        print(banner)

    # Get the total number of industrial control systems services on the Internet
    ics_services = api.count('tag:ics')
    print('Industrial Control Systems: {}'.format(ics_services['total']))

Grab your API key from https://account.shodan.io

Installation
------------

To install the Shodan library, simply:

.. code-block:: bash

    $ pip install shodan

Or if you don't have pip installed (which you should seriously install):

.. code-block:: bash

    $ easy_install shodan


Documentation
-------------

Documentation is available at https://shodan.readthedocs.org/ and https://help.shodan.io

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/achillean/shodan-python",
    "name": "shodan",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "security,network",
    "author": "John Matherly",
    "author_email": "jmath@shodan.io",
    "download_url": "https://files.pythonhosted.org/packages/c5/06/c6dcc975a1e7d89bc764fd271da8138b318e18080b48e7f1acd2ab63df28/shodan-1.31.0.tar.gz",
    "platform": null,
    "description": "shodan: The official Python library and CLI for Shodan\n======================================================\n\n.. image:: https://img.shields.io/pypi/v/shodan.svg\n    :target: https://pypi.org/project/shodan/\n\n.. image:: https://img.shields.io/github/contributors/achillean/shodan-python.svg\n    :target: https://github.com/achillean/shodan-python/graphs/contributors\n\nShodan is a search engine for Internet-connected devices. Google lets you search for websites,\nShodan lets you search for devices. This library provides developers easy access to all of the\ndata stored in Shodan in order to automate tasks and integrate into existing tools.\n\nFeatures\n--------\n\n- Search Shodan\n- `Fast/ bulk IP lookups <https://help.shodan.io/developer-fundamentals/looking-up-ip-info>`_\n- Streaming API support for real-time consumption of Shodan firehose\n- `Network alerts (aka private firehose) <https://help.shodan.io/guides/how-to-monitor-network>`_\n- `Manage Email Notifications <https://asciinema.org/a/7WvyDtNxn0YeNU70ozsxvXDmL>`_\n- Exploit search API fully implemented\n- Bulk data downloads\n- Access the Shodan DNS DB to view domain information\n- `Command-line interface <https://cli.shodan.io>`_\n\n.. image:: https://cli.shodan.io/img/shodan-cli-preview.png\n    :target: https://asciinema.org/~Shodan\n    :width: 400px\n    :align: center\n\n\nQuick Start\n-----------\n\n.. code-block:: python\n\n    from shodan import Shodan\n\n    api = Shodan('MY API KEY')\n\n    # Lookup an IP\n    ipinfo = api.host('8.8.8.8')\n    print(ipinfo)\n\n    # Search for websites that have been \"hacked\"\n    for banner in api.search_cursor('http.title:\"hacked by\"'):\n        print(banner)\n\n    # Get the total number of industrial control systems services on the Internet\n    ics_services = api.count('tag:ics')\n    print('Industrial Control Systems: {}'.format(ics_services['total']))\n\nGrab your API key from https://account.shodan.io\n\nInstallation\n------------\n\nTo install the Shodan library, simply:\n\n.. code-block:: bash\n\n    $ pip install shodan\n\nOr if you don't have pip installed (which you should seriously install):\n\n.. code-block:: bash\n\n    $ easy_install shodan\n\n\nDocumentation\n-------------\n\nDocumentation is available at https://shodan.readthedocs.org/ and https://help.shodan.io\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Python library and command-line utility for Shodan (https://developer.shodan.io)",
    "version": "1.31.0",
    "project_urls": {
        "Homepage": "https://github.com/achillean/shodan-python"
    },
    "split_keywords": [
        "security",
        "network"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c506c6dcc975a1e7d89bc764fd271da8138b318e18080b48e7f1acd2ab63df28",
                "md5": "a478c28c276d9ae60240a2f31eb8d35c",
                "sha256": "c73275386ea02390e196c35c660706a28dd4d537c5a21eb387ab6236fac251f6"
            },
            "downloads": -1,
            "filename": "shodan-1.31.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a478c28c276d9ae60240a2f31eb8d35c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 57939,
            "upload_time": "2023-12-17T01:42:02",
            "upload_time_iso_8601": "2023-12-17T01:42:02.426372Z",
            "url": "https://files.pythonhosted.org/packages/c5/06/c6dcc975a1e7d89bc764fd271da8138b318e18080b48e7f1acd2ab63df28/shodan-1.31.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-17 01:42:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "achillean",
    "github_project": "shodan-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "shodan"
}
        
Elapsed time: 0.15502s