Zhong Eye-zoomeye-python__python

Source: Internet
Author: User

Zhong Eye-zoomeye (https://www.zoomeye.org/) network equipment and Web sites and so on a series of network equipment query tools, and the foreigner that shodan, they are constantly looking for all the Internet-related servers, cameras, printers, routers and so on, Constantly scanning each IP address and different ports.


So, they have become those (pseudo hackers, real hackers I really admire) the use of tools, so know how to attack, know defense, we should understand it, to see if our network equipment in the end unsafe.

Zoomeye is very simple to use, just look at the Help document command to learn to use it immediately. Shortcut key: shift+/.


For example: I want to query the webcam (amount, this, gee), I entered in the input box: Wificam Country:us will look for U.S. WiFi cameras, basically weak password, do not say, try it yourself.

Really do not go out and know the world.

If you do not want to do so, well, the other platform has been given to us, provided the API interface, we just follow the call rules can be called, I'll show you the Python version.

' zoomeye.org ' ' #encoding = ' GBK ' Import OS import sys import requests import JSON import Time page = 1 # zoomeye ' Info p  Erson) # Enter personal account password user = ' passwd = ' def Check (): #POST get Access_token data_info = {' username ': User, ' password ': passwd} #dumps ()-> Python ' object cast the type of json data_encoded = Json.dumps (data_info) #POST respond = RE Quests.post (url = ' Https://api.zoomeye.org/user/login ', data = data_encoded) Try: # loads ()-> JSON cast python ' obj ECT r_decoded = json.loads (respond.text) #get access_token access_token = r_decoded[' Access_token '] except KEYERR
	Or:return ' ErrorInfo ' return access_token # query Syntax def search (): num = input (' Please select the type to search for:1-> device 2-> Web site \ n ')  Global Kinddev Kinddev = num Search = ' search = input (' Please enter the syntax to query: \ n ') global query = ' page= ' + str (page) +  ' & ' + ' query= ' + search # gets Respose object Def getrespose (): # GET Request ' Header headers = {' Authorization ': ' JWT ' + Access_token} # FormAt token and add to HTTP Header respond = requests.get (url = ' https://api.zoomeye.org/host/search? ' + query,headers = hea DERs) #print (respond) if Respond.status_code = = 401:print (' require authorization to login \ n ') Sys.exit () return respond def getip (): R Esult = Json.loads (Getrespose (). Text) output = open (' Ip.txt ', ' + ') for I in Range (0,10): print (str result[' matches '][i [' IP ']] + ': ' + str (result[' matches '][i][' portinfo ' [' Port ']) output.write (str (result[' matches '][i][' IP ')) + ': ' + st R (result[' matches '][i][' portinfo '] [' Port ']) + ' \ n ') output.close () def zoomeye (): # Get Access_token from Check () Glo Bal Access_token Access_token = check () if ' errorinfo ' = = Access_token:print (' Please enter your username and password correctly to obtain Access_token ') Sys.ex

	It () #print (access_token) # query Syntax search ();  # search Device If kinddev:page = Int (input (' Please enter search pages: \ n ')) while True:getip () time.sleep (0.5) page = Page-1 If page = = 0:sys.exit () # Search website elif kinddev:print (' web:\n ') #for I in range (0,10): # Print (str (result[' matches '][i][' IP ')) + ': ' + str (result[' matches '][i][' portinfo '] [' Port ']) if __name__ = ' __main __ ': Zoomeye ()

The above is the approximate way of calling, not carefully written, later slowly supplemented.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.