Skip to main content

Python library and command-line tool for ZoomEye (https://www.zoomeye.ai/doc)

Project description

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
 }

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:

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

The histogram is as follows:

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

0x03 use SDK

1.initialize token

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

APIKEY

from zoomeyeai.sdk import ZoomEye

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

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.

3.SDK example

$ 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\" "'.
https://raw.githubusercontent.com/zoomeye-ai/ZoomEye-python/master/images/web.png
https://raw.githubusercontent.com/zoomeye-ai/ZoomEye-python/master/images/escape.png

Zoomeye Team
Time: 2024.12.05

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zoomeyeai-3.0.1.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zoomeyeai-3.0.1-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file zoomeyeai-3.0.1.tar.gz.

File metadata

  • Download URL: zoomeyeai-3.0.1.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for zoomeyeai-3.0.1.tar.gz
Algorithm Hash digest
SHA256 5815f87ce4d55fed007125e63b9011f0ab1d9524162739b0ea2d3fbaac8353a7
MD5 2930e842003af69c2f4a1807f01f6562
BLAKE2b-256 93055df42ef6b19ccbc514d759764077ad3223ca655bc51e3c8f3c359af553c1

See more details on using hashes here.

File details

Details for the file zoomeyeai-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: zoomeyeai-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for zoomeyeai-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea00f2e294646b688d87a7451d3ec207404387ada15a1ecced17cf820f65b0f4
MD5 ab2f7507ceee36225458a6ab7db1e549
BLAKE2b-256 34b3395ff99b77dadf046c82bf3949fbfb5ece77d90a616a988a334d50bb7654

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page