Skip to content

Commit ae6f8d4

Browse files
committed
实现初始化表功能
1 parent c5c3d7a commit ae6f8d4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

common/utils.py

+7
Original file line numberDiff line numberDiff line change
@@ -771,3 +771,10 @@ def get_ns_path(in_china=None, enable_wildcard=None, ns_ip_list=None):
771771
ns_data = '\n'.join(ns_ip_list)
772772
save_to_file(path, ns_data)
773773
return path
774+
775+
776+
def init_table(domain):
777+
db = Database()
778+
db.drop_table(domain)
779+
db.create_table(domain)
780+
db.close()

oneforall.py

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ def main(self):
147147
:return: subdomain results
148148
:rtype: list
149149
"""
150+
utils.init_table(self.domain)
151+
150152
if not self.access_internet:
151153
logger.log('ALERT', 'Because it cannot access the Internet, '
152154
'OneForAll will not execute the subdomain collection module!')

0 commit comments

Comments
 (0)