diff --git a/common/utils.py b/common/utils.py index 0e6839d..4632da7 100644 --- a/common/utils.py +++ b/common/utils.py @@ -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() diff --git a/oneforall.py b/oneforall.py index 8b5b65c..f65048e 100644 --- a/oneforall.py +++ b/oneforall.py @@ -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!')