0x727/ShuiZe_0x727

quake api未返回对应字段导致报错

Zimba5880 opened this issue · 2 comments

使用quake api查询部分域名时会报以下错误
image

测试发现似乎是quake api有时候返回的data里可能出现不存在service.http.title这个字段导致的

文件路径:

Plugins\infoGather\WebspaceSearchEngine\quakeApi.py

相关代码:

if 'http' in service.keys():
    http = service['http']
    host = http['host'] 
    title = http['title']  # 此处为报错的第62行,由于返回数据里可能没有title这个字段导致报错

经测试使用dict get方法后即可正常运行,建议改成以下形式:

if 'http' in service.keys():
    http = service['http']
    host = http['host'] 
    title = http.get('title','not exist') 

感谢师傅反馈,已修复

感谢,师傅