mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-25 20:37:48 +08:00
适应 bing 和 riskiq 模块最新 API 调用方式
This commit is contained in:
@@ -8,7 +8,7 @@ class RiskIQ(Query):
|
|||||||
self.domain = domain
|
self.domain = domain
|
||||||
self.module = 'Intelligence'
|
self.module = 'Intelligence'
|
||||||
self.source = 'RiskIQAPIQuery'
|
self.source = 'RiskIQAPIQuery'
|
||||||
self.addr = 'https://api.passivetotal.org/v2/enrichment/subdomains'
|
self.addr = 'https://api.riskiq.net/pt/v2/enrichment/subdomains'
|
||||||
self.user = settings.riskiq_api_username
|
self.user = settings.riskiq_api_username
|
||||||
self.key = settings.riskiq_api_key
|
self.key = settings.riskiq_api_key
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ class RiskIQ(Query):
|
|||||||
向接口查询子域并做子域匹配
|
向接口查询子域并做子域匹配
|
||||||
"""
|
"""
|
||||||
self.header = self.get_header()
|
self.header = self.get_header()
|
||||||
|
self.header.update({'Accept': 'application/json'})
|
||||||
self.proxy = self.get_proxy(self.source)
|
self.proxy = self.get_proxy(self.source)
|
||||||
params = {'query': self.domain}
|
params = {'query': self.domain}
|
||||||
resp = self.get(url=self.addr,
|
resp = self.get(url=self.addr,
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class BingAPI(Search):
|
|||||||
self.domain = domain
|
self.domain = domain
|
||||||
self.module = 'Search'
|
self.module = 'Search'
|
||||||
self.source = 'BingAPISearch'
|
self.source = 'BingAPISearch'
|
||||||
self.addr = 'https://api.cognitive.microsoft.com/bing/v7.0/search'
|
self.addr = 'https://api.bing.microsoft.com/v7.0/search'
|
||||||
self.id = settings.bing_api_id
|
self.id = settings.bing_api_id
|
||||||
self.key = settings.bing_api_key
|
self.key = settings.bing_api_key
|
||||||
self.limit_num = 1000 # 必应同一个搜索关键词限制搜索条数
|
self.limit_num = 1000 # 必应同一个搜索关键词限制搜索条数
|
||||||
|
|||||||
Reference in New Issue
Block a user