Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zoomeye 资源信息 获取返回信息已更改 #31

Closed
wsqy opened this issue Jan 4, 2018 · 3 comments
Closed

zoomeye 资源信息 获取返回信息已更改 #31

wsqy opened this issue Jan 4, 2018 · 3 comments
Labels

Comments

@wsqy
Copy link

wsqy commented Jan 4, 2018

https://api.zoomeye.org/resources-info接口原本返回的 host-searchweb-search已合并成 search
现有的代码获取方式有点问题 会导致异常退出

Traceback (most recent call last):
  File "/home/qiyuan/POC-T/lib/cli.py", line 45, in main
    loadPayloads()
  File "/home/qiyuan/POC-T/lib/controller/loader.py", line 49, in loadPayloads
    api_mode()
  File "/home/qiyuan/POC-T/lib/controller/loader.py", line 88, in api_mode
    file = runApi()
  File "/home/qiyuan/POC-T/lib/controller/api.py", line 23, in runApi
    anslist = ZoomEyeSearch(query=dork, limit=limit, type=conf.ZOOMEYE_SEARCH_TYPE, offset=conf.API_OFFSET)
  File "/home/qiyuan/POC-T/lib/api/zoomeye/pack.py", line 25, in ZoomEyeSearch
    z = _initial()
  File "/home/qiyuan/POC-T/lib/api/zoomeye/pack.py", line 16, in _initial
    msg = 'Available ZoomEye search: (web:%s,host:%s)' % (info['web-search'], info['host-search'])
KeyError: 'web-search'

修复方案

path-POC-T/lib/api/zoomeye 下的 pack.py文件 line 16 替换成如下

msg = 'Available ZoomEye search: (search:%s)' % (info.get('web-search', ''))
@kiang70
Copy link

kiang70 commented Jan 4, 2018

感谢分享!

@wsqy
Copy link
Author

wsqy commented Jan 6, 2018

@已提交PR kiang70

@Xyntax Xyntax added the bug label Jan 6, 2018
@Xyntax
Copy link
Owner

Xyntax commented Jan 6, 2018

merged

@Xyntax Xyntax closed this as completed Jan 6, 2018
This was referenced Jan 6, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants