@@ -57,12 +57,7 @@ After successfully installing ``ZoomEye-python``, you can use the
5757
5858Before using the ``ZoomEye-python cli ``, the user ``token `` needs to be
5959initialized. The credential is used to verify the user’s identity to
60- query data from ``ZoomEye ``; we provide two authentication methods:
61-
62- ::
63-
64- 1.username/password
65- 2.APIKEY (recommend)
60+ query data from ``ZoomEye ``; only support API-KEY authentication methods.
6661
6762You can view the help through ``zoomeye init -h ``, and use ``APIKEY `` to
6863demonstrate below:
@@ -79,10 +74,6 @@ information (https://www.zoomeye.org/profile); ``APIKEY`` will not
7974expire, users can reset in personal information according to their
8075needs.
8176
82- in addition, we also provide the initialization method of
83- ``username/password ``. After authentication in this way, the
84- ``JWT-token `` will be returned, which has certain timeliness and
85- requires the user to login again after failure.
8677
87782.query quota
8879^^^^^^^^^^^^^
@@ -623,18 +614,10 @@ The ``-dot`` parameter will generate a picture in ``png`` format and save the or
6236141.initialize token
624615^^^^^^^^^^^^^^^^^^
625616
626- Similarly, the SDK also supports two authentication methods,
627- ``username/password `` and ``APIKEY ``, as follows:
628-
629- **1.user/pass **
630-
631- .. code :: python
632-
633- from zoomeye.sdk import ZoomEye
634-
635- zm = ZoomEye(username = " username" , password = " password" )
617+ Similarly, the SDK also supports API-KEY authentication methods,
618+ ``APIKEY ``, as follows:
636619
637- **2. APIKEY **
620+ **APIKEY **
638621
639622.. code :: python
640623
@@ -649,27 +632,25 @@ The following are the interfaces and instructions provided by the SDK:
649632
650633::
651634
652- 1.login()
653- use username/password or APIKEY for authentication
654- 2.dork_search(dork, page=0, resource="host", facets=None)
635+ 1.dork_search(dork, page=0, resource="host", facets=None)
655636 search the data of the specified page according to dork
656- 3 .multi_page_search(dork, page=1, resource="host", facets=None)
637+ 2 .multi_page_search(dork, page=1, resource="host", facets=None)
657638 search multiple pages of data according to dork
658- 4 .resources_info()
639+ 3 .resources_info()
659640 get current user information
660- 5 .show_count()
641+ 4 .show_count()
661642 get the number of all matching results under the current dork
662- 6 .dork_filter(keys)
643+ 5 .dork_filter(keys)
663644 extract the data of the specified field from the search results
664- 7 .get_facet()
645+ 6 .get_facet()
665646 get statistical results of all data from search results
666- 8 .history_ip(ip)
647+ 7 .history_ip(ip)
667648 query historical data information of an ip
668- 9 .show_site_ip(data)
649+ 8 .show_site_ip(data)
669650 traverse the web-search result set, and output the domain name and ip address
670- 10 .show_ip_port(data)
651+ 9 .show_ip_port(data)
671652 traverse the host-search result set and output the ip address and port
672- 11 .generate_dot(self, q, source=0, page=1)
653+ 10 .generate_dot(self, q, source=0, page=1)
673654 Generate graphviz files and pictures written in the domain center
674655
6756563.SDK example
@@ -684,12 +665,8 @@ The following are the interfaces and instructions provided by the SDK:
684665 ' __file__' , ' __loader__' , ' __name__' , ' __package__' , ' __spec__' ,
685666 ' fields_tables_host' , ' fields_tables_web' , ' getpass' , ' requests' ,
686667 ' show_ip_port' , ' show_site_ip' , ' zoomeye_api_test' ]
687- >> > # Use username and password to login
688- >> > zm = zoomeye.ZoomEye()
689- >> > zm.username = ' username@zoomeye.org'
690- >> > zm.password = ' password'
691- >> > print (zm.login())
692- ... .JIUzI1NiIsInR5cCI6IkpXVCJ9... ..
668+ >> > # Use API-KEY search
669+ >> > zm = zoomeye.ZoomEye(api_key = " 01234567-acbd-00000-1111-22222222222" )
693670 >> > data = zm.dork_search(' apache country:cn' )
694671 >> > zoomeye.show_site_ip(data)
695672 213 .*** .*** .46 .rev.vo*** one.pt [' 46.***.***.213' ]
0 commit comments