zoomeyeai


Namezoomeyeai JSON
Version 3.0.1 PyPI version JSON
download
home_pagehttps://github.com/zoomeye-ai/zoomeye-python
SummaryPython library and command-line tool for ZoomEye (https://www.zoomeye.ai/doc)
upload_time2025-02-06 10:04:28
maintainerNone
docs_urlNone
authorZoomeye Team
requires_pythonNone
licenseNone
keywords security tool zoomeye zoomeyeai command tool
VCS
bugtrack_url
requirements certifi charset-normalizer colorama graphviz idna requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ZoomEye-python
--------------

``ZoomEye`` is a cyberspace search engine, users can search for
network devices using a browser https://www.zoomeye.ai.

``ZoomEye-python`` is a Python library developed based on the
``ZoomEye API``. It provides the ``ZoomEye command line`` mode and can
also be integrated into other tools as an ``SDK``. The library allows
technicians to **search** ``ZoomEye`` data
more conveniently.



0x01 installation
~~~~~~~~~~~~~~~~~

It can be installed directly from ``pypi``:

::

   pip3 install zoomeyeai

or installed from ``github``:

::

   pip3 install git+https://github.com/zoomeye-ai/ZoomEye-python

0x02 how to use cli
~~~~~~~~~~~~~~~~~~~

After successfully installing ``ZoomEye-python``, you can use the
``zoomeyeai`` command directly, as follows:

::

   $ zoomeyeai -h
   usage: zoomeyeai [-h] [-v] {init,info,search} ...
    positional arguments:
      {init,info,search}
        init                Initialize the token for ZoomEye-python
        info                Show ZoomEye account info
        search              Search the ZoomEye database

    optional arguments:
      -h, --help            show this help message and exit
      -v, --version         show program's version number and exit


1.initialize token
^^^^^^^^^^^^^^^^^^

Before using the ``ZoomEye-python cli``, the user ``token`` needs to be
initialized. The credential is used to verify the user’s identity to
query data from ``ZoomEye``; only support API-KEY authentication methods.

You can view the help through ``zoomeyeai init -h``, and use ``APIKEY`` to
demonstrate below:

::

   $ zoomeyeai init -apikey "01234567-acbd-00000-1111-22222222222"
   successfully initialized
   Role: developer
   Quota: 10000

Users can login to ``ZoomEye`` and obtain ``APIKEY`` in personal
information (https://www.zoomeye.ai/profile); ``APIKEY`` will not
expire, users can reset in personal information according to their
needs.


2.query quota
^^^^^^^^^^^^^

Users can query personal information and data quota through the ``info``
command, as follows:

::

   $ zoomeyeai info
    "email": "",
    "username:": "",
    "phone", "",
    "created_at:": ""
    "quota": {
        "plan": "" ,                # service level
        "end_date": "",             # service end date
        "points": "",               # This month remaining free amount
        "zoomeye_points": "",       # Amount of remaining payment this month
    }

3.search
^^^^^^^^

Search is the core function of ``ZoomEye-python``, which is used through
the ``search`` command. the ``search`` command needs to specify the
search keyword (``dork``), let's perform a simple search below:

::

   $ zoomeyeai search "telnet"
    ip                  port             domain               update_time
    192.53.120.134      7766             [unknown]            2024-12-06T15:20:08

   total: 1

Using the ``search`` command is as simple as using a browser to search
in ``ZoomEye``. by default, we display four more important fields. users
can use these data to understand the target information:

::

   1.ip             ip address
   2.port           port
   3.domain         domain of the target
   4.update_time    update time of the target

In the above example, the number to be displayed is specified using the
``-pagesize`` parameter. in addition, ``search`` also supports the following
parameters (``zoomeyeai search -h``) so that users can handle the data. we
will explain and demonstrate below.

::

  -h, --help            show this help message and exit
  -facets facets        if this parameter is specified, the corresponding data
                        will be displayed at the end of the returned result.
                        supported : 'product', 'device', 'service', 'os',
                        'port', 'country', 'subdivisions', 'city'
  -fields field=regexp  display data based on input fields please see:
                        https://www.zoomeye.ai/doc/
  -sub_type {v4,v6,web,all}
                        specify the type of data to search
  -page page            view the page of the query result
  -pagesize pagesize    specify the number of pagesize to search
  -figure {pie,hist}    Pie chart or bar chart showing data,can only be used
                        under facet and stat

4.graphical data
^^^^^^^^^^^^^^^^

The ``-figure`` parameter is a data visualization parameter. This parameter provides two display methods: ``pie (pie chart)`` and ``hist (histogram)``. The data will still be displayed without specifying it. When ``-figure`` is specified , Only graphics will be displayed. The pie chart is as follows:

.. figure:: https://raw.githubusercontent.com/zoomeye-ai/ZoomEye-python/master/images/pie.png
    :width: 500px

The histogram is as follows:

.. figure:: https://raw.githubusercontent.com/zoomeye-ai/ZoomEye-python/master/images/hist.png
    :width: 500px




0x03 use SDK
~~~~~~~~~~~~

.. _initialize-token-1:

1.initialize token
^^^^^^^^^^^^^^^^^^

Similarly, the SDK also supports API-KEY authentication methods,
``APIKEY``, as follows:

**APIKEY**

.. code:: python

   from zoomeyeai.sdk import ZoomEye

   zm = ZoomEye(api_key="01234567-acbd-00000-1111-22222222222")

.. _sdk-api-1:

2.SDK API
^^^^^^^^^

The following are the interfaces and instructions provided by the SDK:

::
   1.userinfo()
     get current user information
   2.search(dork, qbase64='', page=1, pagesize=20, sub_type='all', fields='', facets='')
     get network asset information based on query conditions.

.. _sdk-example-1:

3.SDK example
^^^^^^^^^^^^^

.. code:: python

   $ python3
      >>> import zoomeyeai.sdk as zoomeye
      >>> # Use API-KEY search
      >>> zm = zoomeye.ZoomEye(api_key="01234567-acbd-00000-1111-22222222222")
      >>> data = zm.search('country=cn')
      ip                            port                          domain                        update_time
      192.53.120.134                7766                          [unknown]                     2024-12-06T15:20:08
   ...



0x04 issue
~~~~~~~~~~

| **1.How to enter dork with quotes?**
| When using cli to search, you will encounter dork with quotes, for example: ``"<body style=\"margin:0;padding:0\"> <p align=\"center\"> <iframe src=\"index.xhtml\""``, when dork contains quotation marks or multiple quotation marks, the outermost layer of dork must be wrapped in quotation marks to indicate a parameter as a whole, otherwise command line parameter parsing will cause problems. Then the correct search method for the following dork should be: ``'"<body style=\"margin:0;padding:0\"> <p align=\"center\"> <iframe src=\"index.xhtml\" "'``.

.. figure:: https://raw.githubusercontent.com/zoomeye-ai/ZoomEye-python/master/images/web.png
    :width: 500px


.. figure:: https://raw.githubusercontent.com/zoomeye-ai/ZoomEye-python/master/images/escape.png
    :width: 500px



--------------

| References:
| https://www.zoomeye.ai/doc

| Zoomeye Team
| Time: 2024.12.05






















            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zoomeye-ai/zoomeye-python",
    "name": "zoomeyeai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "security tool, zoomeye, zoomeyeai, command tool",
    "author": "Zoomeye Team",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/93/05/5df42ef6b19ccbc514d759764077ad3223ca655bc51e3c8f3c359af553c1/zoomeyeai-3.0.1.tar.gz",
    "platform": null,
    "description": "ZoomEye-python\n--------------\n\n``ZoomEye`` is a cyberspace search engine, users can search for\nnetwork devices using a browser https://www.zoomeye.ai.\n\n``ZoomEye-python`` is a Python library developed based on the\n``ZoomEye API``. It provides the ``ZoomEye command line`` mode and can\nalso be integrated into other tools as an ``SDK``. The library allows\ntechnicians to **search** ``ZoomEye`` data\nmore conveniently.\n\n\n\n0x01 installation\n~~~~~~~~~~~~~~~~~\n\nIt can be installed directly from ``pypi``:\n\n::\n\n   pip3 install zoomeyeai\n\nor installed from ``github``:\n\n::\n\n   pip3 install git+https://github.com/zoomeye-ai/ZoomEye-python\n\n0x02 how to use cli\n~~~~~~~~~~~~~~~~~~~\n\nAfter successfully installing ``ZoomEye-python``, you can use the\n``zoomeyeai`` command directly, as follows:\n\n::\n\n   $ zoomeyeai -h\n   usage: zoomeyeai [-h] [-v] {init,info,search} ...\n    positional arguments:\n      {init,info,search}\n        init                Initialize the token for ZoomEye-python\n        info                Show ZoomEye account info\n        search              Search the ZoomEye database\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -v, --version         show program's version number and exit\n\n\n1.initialize token\n^^^^^^^^^^^^^^^^^^\n\nBefore using the ``ZoomEye-python cli``, the user ``token`` needs to be\ninitialized. The credential is used to verify the user\u2019s identity to\nquery data from ``ZoomEye``; only support API-KEY authentication methods.\n\nYou can view the help through ``zoomeyeai init -h``, and use ``APIKEY`` to\ndemonstrate below:\n\n::\n\n   $ zoomeyeai init -apikey \"01234567-acbd-00000-1111-22222222222\"\n   successfully initialized\n   Role: developer\n   Quota: 10000\n\nUsers can login to ``ZoomEye`` and obtain ``APIKEY`` in personal\ninformation (https://www.zoomeye.ai/profile); ``APIKEY`` will not\nexpire, users can reset in personal information according to their\nneeds.\n\n\n2.query quota\n^^^^^^^^^^^^^\n\nUsers can query personal information and data quota through the ``info``\ncommand, as follows:\n\n::\n\n   $ zoomeyeai info\n    \"email\": \"\",\n    \"username:\": \"\",\n    \"phone\", \"\",\n    \"created_at:\": \"\"\n    \"quota\": {\n        \"plan\": \"\" ,                # service level\n        \"end_date\": \"\",             # service end date\n        \"points\": \"\",               # This month remaining free amount\n        \"zoomeye_points\": \"\",       # Amount of remaining payment this month\n    }\n\n3.search\n^^^^^^^^\n\nSearch is the core function of ``ZoomEye-python``, which is used through\nthe ``search`` command. the ``search`` command needs to specify the\nsearch keyword (``dork``), let's perform a simple search below:\n\n::\n\n   $ zoomeyeai search \"telnet\"\n    ip                  port             domain               update_time\n    192.53.120.134      7766             [unknown]            2024-12-06T15:20:08\n\n   total: 1\n\nUsing the ``search`` command is as simple as using a browser to search\nin ``ZoomEye``. by default, we display four more important fields. users\ncan use these data to understand the target information:\n\n::\n\n   1.ip             ip address\n   2.port           port\n   3.domain         domain of the target\n   4.update_time    update time of the target\n\nIn the above example, the number to be displayed is specified using the\n``-pagesize`` parameter. in addition, ``search`` also supports the following\nparameters (``zoomeyeai search -h``) so that users can handle the data. we\nwill explain and demonstrate below.\n\n::\n\n  -h, --help            show this help message and exit\n  -facets facets        if this parameter is specified, the corresponding data\n                        will be displayed at the end of the returned result.\n                        supported : 'product', 'device', 'service', 'os',\n                        'port', 'country', 'subdivisions', 'city'\n  -fields field=regexp  display data based on input fields please see:\n                        https://www.zoomeye.ai/doc/\n  -sub_type {v4,v6,web,all}\n                        specify the type of data to search\n  -page page            view the page of the query result\n  -pagesize pagesize    specify the number of pagesize to search\n  -figure {pie,hist}    Pie chart or bar chart showing data\uff0ccan only be used\n                        under facet and stat\n\n4.graphical data\n^^^^^^^^^^^^^^^^\n\nThe ``-figure`` parameter is a data visualization parameter. This parameter provides two display methods: ``pie (pie chart)`` and ``hist (histogram)``. The data will still be displayed without specifying it. When ``-figure`` is specified , Only graphics will be displayed. The pie chart is as follows:\n\n.. figure:: https://raw.githubusercontent.com/zoomeye-ai/ZoomEye-python/master/images/pie.png\n    :width: 500px\n\nThe histogram is as follows:\n\n.. figure:: https://raw.githubusercontent.com/zoomeye-ai/ZoomEye-python/master/images/hist.png\n    :width: 500px\n\n\n\n\n0x03 use SDK\n~~~~~~~~~~~~\n\n.. _initialize-token-1:\n\n1.initialize token\n^^^^^^^^^^^^^^^^^^\n\nSimilarly, the SDK also supports API-KEY authentication methods,\n``APIKEY``, as follows:\n\n**APIKEY**\n\n.. code:: python\n\n   from zoomeyeai.sdk import ZoomEye\n\n   zm = ZoomEye(api_key=\"01234567-acbd-00000-1111-22222222222\")\n\n.. _sdk-api-1:\n\n2.SDK API\n^^^^^^^^^\n\nThe following are the interfaces and instructions provided by the SDK:\n\n::\n   1.userinfo()\n     get current user information\n   2.search(dork, qbase64='', page=1, pagesize=20, sub_type='all', fields='', facets='')\n     get network asset information based on query conditions.\n\n.. _sdk-example-1:\n\n3.SDK example\n^^^^^^^^^^^^^\n\n.. code:: python\n\n   $ python3\n      >>> import zoomeyeai.sdk as zoomeye\n      >>> # Use API-KEY search\n      >>> zm = zoomeye.ZoomEye(api_key=\"01234567-acbd-00000-1111-22222222222\")\n      >>> data = zm.search('country=cn')\n      ip                            port                          domain                        update_time\n      192.53.120.134                7766                          [unknown]                     2024-12-06T15:20:08\n   ...\n\n\n\n0x04 issue\n~~~~~~~~~~\n\n| **1.How to enter dork with quotes?**\n| When using cli to search, you will encounter dork with quotes, for example: ``\"<body style=\\\"margin:0;padding:0\\\"> <p align=\\\"center\\\"> <iframe src=\\\"index.xhtml\\\"\"``, when dork contains quotation marks or multiple quotation marks, the outermost layer of dork must be wrapped in quotation marks to indicate a parameter as a whole, otherwise command line parameter parsing will cause problems. Then the correct search method for the following dork should be: ``'\"<body style=\\\"margin:0;padding:0\\\"> <p align=\\\"center\\\"> <iframe src=\\\"index.xhtml\\\" \"'``.\n\n.. figure:: https://raw.githubusercontent.com/zoomeye-ai/ZoomEye-python/master/images/web.png\n    :width: 500px\n\n\n.. figure:: https://raw.githubusercontent.com/zoomeye-ai/ZoomEye-python/master/images/escape.png\n    :width: 500px\n\n\n\n--------------\n\n| References:\n| https://www.zoomeye.ai/doc\n\n| Zoomeye Team\n| Time: 2024.12.05\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python library and command-line tool for ZoomEye (https://www.zoomeye.ai/doc)",
    "version": "3.0.1",
    "project_urls": {
        "Homepage": "https://github.com/zoomeye-ai/zoomeye-python"
    },
    "split_keywords": [
        "security tool",
        " zoomeye",
        " zoomeyeai",
        " command tool"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "34b3395ff99b77dadf046c82bf3949fbfb5ece77d90a616a988a334d50bb7654",
                "md5": "ab2f7507ceee36225458a6ab7db1e549",
                "sha256": "ea00f2e294646b688d87a7451d3ec207404387ada15a1ecced17cf820f65b0f4"
            },
            "downloads": -1,
            "filename": "zoomeyeai-3.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ab2f7507ceee36225458a6ab7db1e549",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 23392,
            "upload_time": "2025-02-06T10:04:26",
            "upload_time_iso_8601": "2025-02-06T10:04:26.994491Z",
            "url": "https://files.pythonhosted.org/packages/34/b3/395ff99b77dadf046c82bf3949fbfb5ece77d90a616a988a334d50bb7654/zoomeyeai-3.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "93055df42ef6b19ccbc514d759764077ad3223ca655bc51e3c8f3c359af553c1",
                "md5": "2930e842003af69c2f4a1807f01f6562",
                "sha256": "5815f87ce4d55fed007125e63b9011f0ab1d9524162739b0ea2d3fbaac8353a7"
            },
            "downloads": -1,
            "filename": "zoomeyeai-3.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2930e842003af69c2f4a1807f01f6562",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 22790,
            "upload_time": "2025-02-06T10:04:28",
            "upload_time_iso_8601": "2025-02-06T10:04:28.743210Z",
            "url": "https://files.pythonhosted.org/packages/93/05/5df42ef6b19ccbc514d759764077ad3223ca655bc51e3c8f3c359af553c1/zoomeyeai-3.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-06 10:04:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zoomeye-ai",
    "github_project": "zoomeye-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2021.10.8"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "2.0.8"
                ]
            ]
        },
        {
            "name": "colorama",
            "specs": [
                [
                    "==",
                    "0.4.4"
                ]
            ]
        },
        {
            "name": "graphviz",
            "specs": [
                [
                    "==",
                    "0.19"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.3"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.26.0"
                ]
            ]
        }
    ],
    "lcname": "zoomeyeai"
}
        
Elapsed time: 0.47351s