api配置分离

This commit is contained in:
Jing Ling
2020-02-10 20:11:15 +08:00
parent 3f8aa8b74d
commit 38c4de6896
21 changed files with 196 additions and 196 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import config
import api
from common.query import Query
@@ -9,8 +9,8 @@ class RiskIQ(Query):
self.module = 'Intelligence'
self.source = 'RiskIQAPIQuery'
self.addr = 'https://api.passivetotal.org/v2/enrichment/subdomains'
self.user = config.riskiq_api_username
self.key = config.riskiq_api_key
self.user = api.riskiq_api_username
self.key = api.riskiq_api_key
def query(self):
"""
@@ -1,4 +1,4 @@
import config
import api
from common.query import Query
@@ -9,7 +9,7 @@ class ThreatBookAPI(Query):
self.module = 'Intelligence'
self.source = 'ThreatBookAPIQuery'
self.addr = 'https://x.threatbook.cn/api/v1/domain/query'
self.key = config.threatbook_api_key
self.key = api.threatbook_api_key
def query(self):
"""
@@ -1,4 +1,4 @@
import config
import api
from common.query import Query
@@ -9,7 +9,7 @@ class VirusTotalAPI(Query):
self.module = 'Intelligence'
self.source = 'VirusTotalAPIQuery'
self.addr = 'https://www.virustotal.com/vtapi/v2/domain/report'
self.key = config.virustotal_api_key
self.key = api.virustotal_api_key
def query(self):
"""