mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-25 20:37:48 +08:00
@@ -86,3 +86,6 @@ fullhunt_api_key = ''
|
||||
|
||||
# 登录quake之后可在个人中心获取key https://quake.360.net/quake/#/personal?tab=message
|
||||
quake_api_key = ''
|
||||
|
||||
#https://www.racent.com/ctlog F2>Network抓包获取Token
|
||||
racent_api_token = ''
|
||||
@@ -0,0 +1,49 @@
|
||||
from config import settings
|
||||
from common.query import Query
|
||||
|
||||
|
||||
class Racent(Query):
|
||||
def __init__(self, domain):
|
||||
Query.__init__(self)
|
||||
self.domain = domain
|
||||
self.module = 'Certificate'
|
||||
self.source = 'Racent'
|
||||
self.addr = 'https://face.racent.com/tool/query_ctlog'
|
||||
self.api = settings.racent_api_token
|
||||
|
||||
def query(self):
|
||||
"""
|
||||
向接口查询子域并做子域匹配
|
||||
"""
|
||||
self.header = self.get_header()
|
||||
self.proxy = self.get_proxy(self.source)
|
||||
params = {'token': self.api, 'keyword': self.domain}
|
||||
resp = self.get(self.addr, params)
|
||||
self.subdomains = self.collect_subdomains(resp)
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
类执行入口
|
||||
"""
|
||||
if not self.have_api(self.api):
|
||||
return
|
||||
self.begin()
|
||||
self.query()
|
||||
self.finish()
|
||||
self.save_json()
|
||||
self.gen_result()
|
||||
self.save_db()
|
||||
|
||||
|
||||
def run(domain):
|
||||
"""
|
||||
类统一调用入口
|
||||
|
||||
:param str domain: 域名
|
||||
"""
|
||||
query = Racent(domain)
|
||||
query.run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run('example.com')
|
||||
@@ -0,0 +1,45 @@
|
||||
from common.query import Query
|
||||
|
||||
|
||||
class Dnsgrep(Query):
|
||||
def __init__(self, domain):
|
||||
Query.__init__(self)
|
||||
self.domain = domain
|
||||
self.module = 'Dataset'
|
||||
self.source = 'Dnsgrep'
|
||||
self.addr = 'https://www.dnsgrep.cn/subdomain/{domain}'
|
||||
|
||||
def query(self):
|
||||
"""
|
||||
向接口查询子域并做子域匹配
|
||||
"""
|
||||
self.header = self.get_header()
|
||||
self.proxy = self.get_proxy(self.source)
|
||||
self.addr = self.addr.format(domain=self.domain)
|
||||
resp = self.get(self.addr)
|
||||
self.subdomains = self.collect_subdomains(resp)
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
类执行入口
|
||||
"""
|
||||
self.begin()
|
||||
self.query()
|
||||
self.finish()
|
||||
self.save_json()
|
||||
self.gen_result()
|
||||
self.save_db()
|
||||
|
||||
|
||||
def run(domain):
|
||||
"""
|
||||
类统一调用入口
|
||||
|
||||
:param str domain: 域名
|
||||
"""
|
||||
query = Dnsgrep(domain)
|
||||
query.run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run('example.com')
|
||||
Reference in New Issue
Block a user