mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-25 00:56:14 +08:00
实现初始化表功能
This commit is contained in:
@@ -771,3 +771,10 @@ def get_ns_path(in_china=None, enable_wildcard=None, ns_ip_list=None):
|
||||
ns_data = '\n'.join(ns_ip_list)
|
||||
save_to_file(path, ns_data)
|
||||
return path
|
||||
|
||||
|
||||
def init_table(domain):
|
||||
db = Database()
|
||||
db.drop_table(domain)
|
||||
db.create_table(domain)
|
||||
db.close()
|
||||
|
||||
@@ -147,6 +147,8 @@ class OneForAll(object):
|
||||
:return: subdomain results
|
||||
:rtype: list
|
||||
"""
|
||||
utils.init_table(self.domain)
|
||||
|
||||
if not self.access_internet:
|
||||
logger.log('ALERT', 'Because it cannot access the Internet, '
|
||||
'OneForAll will not execute the subdomain collection module!')
|
||||
|
||||
Reference in New Issue
Block a user