• 信息收集之zoomeye


    一.浏览器上使用api接口

    1.https://api.zoomeye.org/user/login
     post传参:{"username" : "username","password" : "password"}

    2.返回的token,用Modify Headers修改为"Authorization: JWT <YOUR-API-TOKEN>"

    3.请求http://api.zoomeye.org/host/search?query="corporate/webpages/login.jsp"&facet=app,os,country&page=1可得json信息
     #query查询关键词;page翻页参数(默认为1);facets统计项目,如果为多个,使用, 号分隔各个统计项

    二.python自动化利用

    # -*- coding: UTF-8 -*-
    import json
    import requests
    page = 1
    PAGES = 5
    
    def json_info(page):
        access_token='<YOUR-API-TOKEN>'
        headers = {'Authorization' : 'JWT ' + access_token,}
        r = requests.get(url = 'http://api.zoomeye.org/host/search?query="corporate/webpages/login.jsp"&page=' + str(page),headers = headers)
        r_decoded = json.loads(r.text) #将一个json串转化为dict
        #print r_decoded
        return r_decoded
    
    if __name__ == '__main__':
        while page <= PAGES:
            r_decoded = json_info(page)
            with open('zoomeye.txt','a')as f:
                for i in r_decoded['matches']:
                    print i['ip'] + ' in ' + i['geoinfo']['country']['names']['en']
                    f.write(i['ip'] + ' in ' + i['geoinfo']['country']['names']['en']+'
    ')
            page+=1
        print 'Searched_ip:' + str(r_decoded['total'])
        with open('zoomeye.txt','a')as f:
            f.write('Searched_ip:' + str(r_decoded['total']))

    固定属性*
    | 名称                           |  类型  |  说明                                 | 示例
    | ------                        |------  |  -------------                    | ---  
    | site                          | string | 网站地址                             | foo.com
    | ip                             | string | IP  地址                              | foo.com
    | headers                    | string | HTTP  请求头                        | HTTP/1.1...
    | title                           | string | HTTP 标题                            | Hello Welcome...
    | description                  | strine | HTTP meta description 属性  | foo
    | keyword                       | string | HTTP meta 关键词             | foo
    | domains                      | string | 站点包含子域                     | a.com
    | waf.name                     | string | Web 防火墙名称               | jiasule
    | waf.version                  | string | Web 防火墙名称版本         | v1.0
    | server.name                 | string | Web 服务器名称               | nginx
    | server.version               | string | Web 服务器版本               | 1.9.2
    | component.name             | string | Web 容器名称               | mod_ssl
    | component.version          | string | Web 容器版本               | v1.0
    | language                       | string | Web 编程语言               | php
    | db.name                       | string |  数据库名称                  | MySQL
    | db.version                     | string | 数据库版本                   | v1.0
    | frontend.name                 | string |  前端组件名称              | jQuery
    | frontend.version               | string | 前端组件版本               | v1.0
    | thirdparty                        | string |  第三方组件民称            | v1.0
    | plugin.url                         | string |  插件 url                  | www.google.com/analysics
    | plugin.name                     | string |  插件名称                  | google analysics
    | plugin.version                  | string | 插件版本                   | v1.0
    | webapp.url                      | string | web 应用 url               | wordpress.org
    | webapp.name                  | string | Web 应用名称 name          | wordpress
    | webapp.version                | string | Web 应用版本               | wordpress version
    | html                                | string | HTTP HTML 请求体           | <Doctype....>
    | geoinfo.asn                      | string | ASN 号                     | AS4134
    | geoinfo.isp                       | string | 运营商                     | China Telecom Guangdong
    | geoinfo.city                      | string | 城市                       | Guangzhou
    | geoinfo.country.code        | string | 国家码                     | CN
    | geoinfo.country.name       | string | 国家名称                   | China
    | geoinfo.continent.code      | string | 洲际码                     | AS
    | geoinfo.continent.name     | string | 洲际名称                   | Asia
    | geoinfo.location.latitude     | float  | 纬度                       | 23.0268
    | geoinfo.location.longitude  | float  | 经度                       | 113.1315

    *注意转json串转化为了dict,所以要访问内嵌字典eg.i['geoinfo']['country']['names']['en']

  • 相关阅读:
    修改nuget包默认存放路径,避免增加C盘的负担
    .Net Core 3.0 (一):安装Vs2019
    .NET Core 学习资料
    SQLSERVER查询整个数据库中某个特定值所在的表和字段的方法
    MySql 时间查询
    如何设置IIS程序池的回收时间,才能最大程度的减少对用户的影响?
    SqlServer 获取工作日(周六、周日休息,周六日不休息,周六不休息)
    SQL Server 删除数据库中表数据
    SQL Server 删除数据库所有表和所有存储过程
    摘要
  • 原文地址:https://www.cnblogs.com/Dleo/p/5726413.html
Copyright © 2020-2023  润新知